SimpleCategoryList - category as apramater and display links
Re: SimpleCategoryList - category as apramater and display links
Hmm. I'm using an older (Fall 2008) version of Able, and my SimpleCategoryList control already does both of those things.
Nick Cole
http://www.ethofy.com
http://www.ethofy.com
- jmestep
- AbleCommerce Angel
- Posts: 8164
- Joined: Sun Feb 29, 2004 8:04 pm
- Location: Dayton, OH
- Contact:
Re: SimpleCategoryList - category as apramater and display links
If you are talking about the links or webpages not displaying after navigating to the category (in the center content), some of the category grids display them, but others don't.
Judy Estep
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx
- jmestep
- AbleCommerce Angel
- Posts: 8164
- Joined: Sun Feb 29, 2004 8:04 pm
- Location: Dayton, OH
- Contact:
Re: SimpleCategoryList - category as apramater and display links
Here is the part of the code that changed in the .cs from 10863:
From 11659
Then 11659 has this added right before the </asp:Panel>
<asp:Localize ID="NoSubCategoriesText" runat="server" Visible="false" EnableViewState="false" Text="There are no sub-categories in <strong>{0}</strong>."></asp:Localize>
Code: Select all
protected void Page_Load(object sender, EventArgs e)
{
if (!string.IsNullOrEmpty(CssClass)) MainPanel.CssClass = CssClass;
if (!string.IsNullOrEmpty(HeaderCssClass)) HeaderPanel.CssClass = HeaderCssClass;
if (!string.IsNullOrEmpty(HeaderText)) HeaderTextLabel.Text = HeaderText;
if (!string.IsNullOrEmpty(ContentCssClass)) ContentPanel.CssClass = ContentCssClass;
if (_CategoryId < 0) _CategoryId = PageHelper.GetCategoryId();
CategoryList.DataSource = CategoryDataSource.LoadForParent(_CategoryId, true);
CategoryList.DataBind();
}
Code: Select all
protected void Page_Load(object sender, EventArgs e)
{
if (!string.IsNullOrEmpty(CssClass)) MainPanel.CssClass = CssClass;
if (!string.IsNullOrEmpty(HeaderCssClass)) HeaderPanel.CssClass = HeaderCssClass;
if (!string.IsNullOrEmpty(HeaderText)) HeaderTextLabel.Text = HeaderText;
if (!string.IsNullOrEmpty(ContentCssClass)) ContentPanel.CssClass = ContentCssClass;
if (_CategoryId < 0) _CategoryId = PageHelper.GetCategoryId();
CategoryCollection subCategories = CategoryDataSource.LoadForParent(_CategoryId, true);
CategoryList.DataSource = subCategories;
CategoryList.DataBind();
if(subCategories.Count == 0)
{
Category category = CategoryDataSource.Load(_CategoryId);
if (category != null)
{
NoSubCategoriesText.Text = String.Format(NoSubCategoriesText.Text, category.Name);
NoSubCategoriesText.Visible = true;
}
}
}
<asp:Localize ID="NoSubCategoriesText" runat="server" Visible="false" EnableViewState="false" Text="There are no sub-categories in <strong>{0}</strong>."></asp:Localize>
Judy Estep
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx
- jmestep
- AbleCommerce Angel
- Posts: 8164
- Joined: Sun Feb 29, 2004 8:04 pm
- Location: Dayton, OH
- Contact:
Re: SimpleCategoryList - category as apramater and display links
Why do you want to do that? In that case search engines would have two links to the same content and might think you have duplicate content. There have been posts on the forum from people wanting to get rid of that situation.
You might find code in the Admin/Catalog/Browse.aspx to do that-- when you click on a link to edit an item there, it takes you to a non-url rewritten url.
You might find code in the Admin/Catalog/Browse.aspx to do that-- when you click on a link to edit an item there, it takes you to a non-url rewritten url.
Judy Estep
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx
Re: SimpleCategoryList - category as apramater and display links
In fact the actual page URL is something like
.../Category.aspx?CategoryId=1
The rewriiten verison of this URL is
.../Sample-Category-C1.aspx
So by using either of above URLs you will get same page. That's why Judy said that if you used these different URLs then search engine may get confused and mark page as duplicate contents.
.../Category.aspx?CategoryId=1
The rewriiten verison of this URL is
.../Sample-Category-C1.aspx
So by using either of above URLs you will get same page. That's why Judy said that if you used these different URLs then search engine may get confused and mark page as duplicate contents.
- jmestep
- AbleCommerce Angel
- Posts: 8164
- Joined: Sun Feb 29, 2004 8:04 pm
- Location: Dayton, OH
- Contact:
Re: SimpleCategoryList - category as apramater and display links
If you select CategoryDetailsPage as the display page for the category, it will show subcategories, links, webpages and products for that category.
Judy Estep
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx
- jmestep
- AbleCommerce Angel
- Posts: 8164
- Joined: Sun Feb 29, 2004 8:04 pm
- Location: Dayton, OH
- Contact:
Re: SimpleCategoryList - category as apramater and display links
That is because the menus are coded for only categories or subcategories. You would have to customize it to show the other objects. You could possibly replace the
CategoryCollection subCategories = CategoryDataSource.LoadForParent(_CategoryId, true);
with code using CatalogDataSource.LoadForCategory(_CategoryId,true);
CategoryCollection subCategories = CategoryDataSource.LoadForParent(_CategoryId, true);
with code using CatalogDataSource.LoadForCategory(_CategoryId,true);
Judy Estep
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx
- jmestep
- AbleCommerce Angel
- Posts: 8164
- Joined: Sun Feb 29, 2004 8:04 pm
- Location: Dayton, OH
- Contact:
Re: SimpleCategoryList - category as apramater and display links
You could probably put logic into the code to filter out products
if (catalogObject is Category || catalogObject is Webpage..............
or something similar
if (catalogObject is Category || catalogObject is Webpage..............
or something similar
Judy Estep
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx
- mfreeze
- Commodore (COMO)
- Posts: 421
- Joined: Mon Jan 24, 2005 2:07 pm
- Location: Washington, NJ
- Contact:
Re: SimpleCategoryList - category as apramater and display links
Dynami,
I am interested in doing something similar.
Could you share your categorylist.aspx and categorylist.aspx.cs code?
I am interested in doing something similar.
Could you share your categorylist.aspx and categorylist.aspx.cs code?
Mary E Freeze
Freeze Frame Graphics
Web Hosting and Design, ASP and CFMX Development
http://www.ffgraphics.com
Freeze Frame Graphics
Web Hosting and Design, ASP and CFMX Development
http://www.ffgraphics.com