Hello All
I have a question.
How would I create a CategoryGridPage that pulled up a designated sub-category. I want to create a page about a vendor and have a CategoryGridPage with the sub-category below the article. I want to call it with something like [[ConLib:Custom\CategoryGridPageSpecialVendor]] or something like that. Is this even possible?
thanks in advance.
jh
Disignated CategoryGridPage below article.
Re: Disignated CategoryGridPage below article.
Do you already have a category set up for this vendor with their products? If so, take a look at the .CS file for the CategoryGridPages you'll find a section of code beginning
If you don't have the SearchSideBar active on your page, then this code uses the PageHelper.GetCategoryId() function which is in the app_code\PageHelper.cs file.
That function will look on the query string for CategoryId=#### where the #### is your category number. If you do have a category with this vendor's product already set up, you can browse to that category in admin and click on the preview button. It will give you the SEO-friendly URL.
Will that do what you want or do you need something more complex?
Code: Select all
public int CategoryId
That function will look on the query string for CategoryId=#### where the #### is your category number. If you do have a category with this vendor's product already set up, you can browse to that category in admin and click on the preview button. It will give you the SEO-friendly URL.
Will that do what you want or do you need something more complex?
Re: Disignated CategoryGridPage below article.
Thanks for the help david.
I found the code you we talking about on the .cs file.
Can I have many categoryGridPages for all of the vendors I want to do articles on and just change the url for each sub-category I want to link to. I do not really want them to be linked in the sidebar, just from a "<a href="url"></a>" on the front page.
thanks again,
jh
I found the code you we talking about on the .cs file.
I assume I do have the SearchSidebar active since it is being referenced in the code on the .ascx pagepublic int CategoryId
{
get
{
if(_SearchSidebar != null && _SearchSidebar.CategoryId > 0) return _SearchSidebar.CategoryId;
if (ViewState["CategoryId"] == null)
ViewState["CategoryId"] = PageHelper.GetCategoryId();
return (int)ViewState["CategoryId"];
}
set
{
ViewState["CategoryId"] = value;
}
}
where do i put the SEO-friendly url?<%@ Register Src="~/ConLib/CategorySearchSidebar.ascx" TagName="CategorySearchSidebar" TagPrefix="uc" %>
Can I have many categoryGridPages for all of the vendors I want to do articles on and just change the url for each sub-category I want to link to. I do not really want them to be linked in the sidebar, just from a "<a href="url"></a>" on the front page.
thanks again,
jh
Re: Disignated CategoryGridPage below article.
If you're setting up categories to hold these vendors, you can create a new top level category called VENDORS and then create a new sub-category for each of your vendors. Just make the VENDORS category Hidden and it won't show up in your category tree. You will want the sub-categories to be Public.
While in the Browse Category area in admin, just click on the preview button for each vendor sub-category and you'll see the SEO-friendly URL.
What version of Able are you using?
While in the Browse Category area in admin, just click on the preview button for each vendor sub-category and you'll see the SEO-friendly URL.
What version of Able are you using?