Rank: Member
Joined: 12/30/2006(UTC) Posts: 65
|
Hi Gang,
Can someone assist with the correct .net syntax for this:
I want to replace the ColumnName based on a Querystring variable here: <uc4:ContentColumnControl ID="CategoryColumn" runat="server" ColumnName="NYCPet Category Content" />
I'm sure I need to set up a case in the aspx.vb file, and then reference it in the aspx file
I tried an old school VBScript Select case on the aspx file but that didn't seem to work. I didn't think it would work, and not as efficient as it should be Can someone lend an assist with the right .net syntax. Here's the old school versions of what I'm trying to do.
<% Dim strColumn as String
Select case request.QueryString("Cat")
Case "One" strColumn = "Category - One" Case "Two" strColumn = "Category - Two"
End select %> <uc4:ContentColumnControl ID="CategoryColumn" runat="server" ColumnName=<%=strColumn%> />
Thanks for any assist. -Dave
|
|
|
|
Rank: Member
Joined: 1/3/2004(UTC) Posts: 1,497
|
I'm not sure I understand what you are trying to do, but I pretty certain you can't mix ASP and ASP.NET. You need to look at the code behind apsx.vb page that corresponds to your page you are trying to change. If I follow the code correctly, the content columns are named to correspond with the names listed in the BVadmin/content/columns.aspx page. You can create a new one there, if that helps solve you issue. Maybe if you provided more details into what you are trying to do, then you could get a better answer. |
|
|
|
|
Rank: Member
Joined: 12/30/2006(UTC) Posts: 65
|
Hey Chris,
Thanks for the quick reply.
Basically, I'm set it up so I can drop a product grid content block into a category template. I did that by creating a custom column, and dropped this onto the content page <uc4:ContentColumnControl ID="CategoryColumn" runat="server" ColumnName="MyCustomColumn />
That works fine, so I can set up some feature products on the category listing page. (It gives me better flexibility than just using sub category #2 template.. I can put other content blocks in there now if need be)
Thing is, the same feature products appear for all the different categories (since it's a hard coded inclusion of the same custom column).. which isn't keeping things relevant to the particular category. So I need to drop a different product grid onto the different category pages, and I can do that by creating different custom columns for each category and setting up the product grid within each as need be.
Now, I could further create a separate category template by copying one template folder and renaming it to something else, then selecting that in the admin for each category. But I want to keep one category template (in case i make a cosmetic change, i only do it once to one template).
So In the end, I'm trying to pull in a different custom column based on a querystring variable (I created using the category URL rewriting).
It's like how we can assign a banner to each category, and it's pulled into the same template. I'm trying to "rig" the ability to pull in a different custom column in the same way... so I can show a different product grid content block based on the category.
I'm sure I'm making this way more involved than need be, but it's the best I can figure at the moment to pull of that end goal.
Hopefully I was able to explain that well. It's a road that has a lot of turns, but I think the theory works. Thanks -Dave
|
|
|
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.