I’ve a few questions about using the site map feature, mainly with displaying a site map on the web site.
Firstly Joe from Solunar Services had posted a piece of code that uses the web.sitemap file. viewtopic.php?t=5851
I created a Sitemaptest.aspx file and the code works great.
1. I tried to place the code into a new Scriptlet ‘sitemap1’ and assigned that as a content area to a sitemap.aspx page. This didn’t work even after striping off some of the obvious things from the code.
a. Anyone know how to use the Web.sitemap file and display it as a content area in a new page.
2. I have created 2 additional pages with the Able Method. Copying and renaming Webpage.aspx. And this works great for the editor and themes; however the new pages do not show up in the Web.sitemap file or the Sitemap.xml file.
a. How can we create pages that will show up in the Web.sitemap and the sitemap.xml files?
3. How can we have Categories show up in the web.sitemap file.
4. How can we limit some of the pages that show up in the web.sitemap file?
a. Our generated web.sitemap file has the ‘your account’ area in it, we would prefer that this area not be displayed.
Thanks in advance
Sitemap Usage
- Hostmaster
- Commander (CMDR)
- Posts: 126
- Joined: Fri Jan 04, 2008 3:30 pm
- Location: Melbourne Fl
- Contact:
Pete,
The code I provided in that post you referenced is .Net code. Scriptlets only work with HTML.
The way around this, as is always the case in AC7, is create a .Net user control, put the code there, and then reference that user control in your scriptlet.
For example:
1. Make a new user control in ~/ConLib/Custom/Whatever.ascx.
2. Add the .Net code like you did to your test page.
3. Now edit a content or sidebar scriptlet and put the line in:
Notice the path should be specified and the extension is not specified.
Now, log into admin on your site. Navigate to the page you want this code to appear. Switch to Edit Mode using the dropdown at the bottom of the page.
Assign the scriptlet you edited to the section of the page you want i.e. sidebar or content etc.
Click Apply. Now your user control, referenced from the scriptlet, will appear in the designated zone of your page.
Web.Sitemap is a XML file used by .Net controls to render menu structure and breadcrumb controls. It must be manually edited to add or remove menu item choices. Just look at the file and you'll see how existing pages are referenced - very easy to add more. Look at the ~/Admin/Admin.sitemap file for a larger version.
Sitemap.xml is a format standard implemented by the three largest search engine providers to encourage a standard for site content upload. This file is generated by AC7 through the AC7 Admin screen and contains all the SEO-friendfly URLs to every product in your store.
There are ways to tell search engines to "come get some" and read your sitemap.xml file. This greatly accelerates the process of getting every single product in your store, with SEO-friendly URLS, loaded in major search engines. Check out http://www.sitemap.org for more details.
Newly created pages will not be automatically added to either the web.sitemap or sitemap.xml files by AC7.
Since the web.sitemap file is not automatically maintained, any extra content pages (.aspx) you create must be added manually if you want them included in the breadcrumb trail or part of a third-party menu control dependent on web.sitemap.
Additional Notes
In the root of your site is a small text file called robots.txt. This file tells major search engines what rules to follow when spiders crawl your site. The default robots.txt file is configured so that the ~/Members/ folder is excluded i.e. the My Account secured pages are ignored by spiders. They can't authenticate those pages anyways but it's a good practice nonetheless.
If you want a dynamic menu structure referencing your various categories, you will have to create a user control to do it.
The code I provided in that post you referenced is .Net code. Scriptlets only work with HTML.
The way around this, as is always the case in AC7, is create a .Net user control, put the code there, and then reference that user control in your scriptlet.
For example:
1. Make a new user control in ~/ConLib/Custom/Whatever.ascx.
2. Add the .Net code like you did to your test page.
3. Now edit a content or sidebar scriptlet and put the line in:
Code: Select all
[[ConLib:Custom\Whatever]]
Now, log into admin on your site. Navigate to the page you want this code to appear. Switch to Edit Mode using the dropdown at the bottom of the page.
Assign the scriptlet you edited to the section of the page you want i.e. sidebar or content etc.
Click Apply. Now your user control, referenced from the scriptlet, will appear in the designated zone of your page.
web.sitemap is a manual file - it does not get automatically updated by the system. If you want something included in it, just edit the file with a text editor. sitemap.xml only contains store product URLs - AC7 does not know about your own custom .aspx pages and therefore cannot add them automatically.however the new pages do not show up in the Web.sitemap file or the Sitemap.xml file.
Be very careful when referring to web.sitemap and sitemap.xml in the same conversation. They are two completely different things.How can we create pages that will show up in the Web.sitemap and the sitemap.xml files?
Web.Sitemap is a XML file used by .Net controls to render menu structure and breadcrumb controls. It must be manually edited to add or remove menu item choices. Just look at the file and you'll see how existing pages are referenced - very easy to add more. Look at the ~/Admin/Admin.sitemap file for a larger version.
Sitemap.xml is a format standard implemented by the three largest search engine providers to encourage a standard for site content upload. This file is generated by AC7 through the AC7 Admin screen and contains all the SEO-friendfly URLs to every product in your store.
There are ways to tell search engines to "come get some" and read your sitemap.xml file. This greatly accelerates the process of getting every single product in your store, with SEO-friendly URLS, loaded in major search engines. Check out http://www.sitemap.org for more details.
Newly created pages will not be automatically added to either the web.sitemap or sitemap.xml files by AC7.
Each category has a SEO-friendly URL. The way I did it was to pull up the store side and set the left sidebar to the AC7 default category list. The URL that each button points to is the SEO-friendly URL for that category. Just add those URL's to the web.sitemap file manually like any other menu option. Be sure to use relative references like ~/Digital-Cameras-C12.aspx so the menu structure works both locally and on your live site.How can we have Categories show up in the web.sitemap file.
Since the web.sitemap file is not automatically maintained, any extra content pages (.aspx) you create must be added manually if you want them included in the breadcrumb trail or part of a third-party menu control dependent on web.sitemap.
Delete their reference in the web.sitemap file.How can we limit some of the pages that show up in the web.sitemap file?
Remove it from the web.sitemap file.Our generated web.sitemap file has the ‘your account’ area in it, we would prefer that this area not be displayed.
Additional Notes
In the root of your site is a small text file called robots.txt. This file tells major search engines what rules to follow when spiders crawl your site. The default robots.txt file is configured so that the ~/Members/ folder is excluded i.e. the My Account secured pages are ignored by spiders. They can't authenticate those pages anyways but it's a good practice nonetheless.
If you want a dynamic menu structure referencing your various categories, you will have to create a user control to do it.
Joe Payne
AbleCommerce Custom Programming and Modules http://www.AbleMods.com/
AbleCommerce Hosting http://www.AbleModsHosting.com/
Precise Fishing and Hunting Time Tables http://www.Solunar.com
AbleCommerce Custom Programming and Modules http://www.AbleMods.com/
AbleCommerce Hosting http://www.AbleModsHosting.com/
Precise Fishing and Hunting Time Tables http://www.Solunar.com
Correction
Category URLs are included in sitemap.xml by default. If they aren't there, it's a bug and a ticket should be opened with Able.
Category URLs are included in sitemap.xml by default. If they aren't there, it's a bug and a ticket should be opened with Able.
Joe Payne
AbleCommerce Custom Programming and Modules http://www.AbleMods.com/
AbleCommerce Hosting http://www.AbleModsHosting.com/
Precise Fishing and Hunting Time Tables http://www.Solunar.com
AbleCommerce Custom Programming and Modules http://www.AbleMods.com/
AbleCommerce Hosting http://www.AbleModsHosting.com/
Precise Fishing and Hunting Time Tables http://www.Solunar.com
- Hostmaster
- Commander (CMDR)
- Posts: 126
- Joined: Fri Jan 04, 2008 3:30 pm
- Location: Melbourne Fl
- Contact:
The web.sitemap file is used by several .Net controls and AC7 functions to produce menu options and breadcrumb controls. The error received was most likely not the result of the Generate Site Map option trying to connect the web.sitemap file, but rather IIS was trying to read the web.sitemap file so it could render breadcrumb or other menu controls. This would happen in most any area once you've nuked the core file that provides the .Net controls with the information it needs - has nothing to do with AC7.However there is some relationship between Able and this File as if you delete it and then try to generate the XML site map, the following error appears.
So don't modify it. Make a copy of it and change the copy. Then reference the copy instead of the original in your controls. That's how most people do it, including me. AC7 upgrades aren't going to come every two weeks, so managing future AC7 revisions to the file isn't going to be all that burdensome.So while I have no issues with coding this myself what I am concerned about is it being overwritten, which currently it is not being overwritten as far as I can tell.
Either way, you're going to have to hard-code new non-AC7 pages somewhere. Either with manual edits to the web.sitemap file or manual edits into your own menu control. That's the tradeoff Able made when they chose to leverage existing .Net controls versus making custom controls that provide a higher level of sophistication.
I prefer the web.sitemap control standard because it allows me to use other third-party controls that also support the same .Net standard. Using any third-party menu control would be far more complicated if Able customized their own sitemap implementation.
I'm not sure if you're referring to the web.sitemap file or the sitemap.xml file since both use the XML format. The sitemap.xml will always automatically include any new products and categories to your site the next time you initiate the Generate Site Map option.As for the XML file, If the code is to generate the XML then we should have a way to inform it about new / additional pages that are created using Ables Method.
Remember that the sitemap.xml standard was designed and implemented to assist with large bulk uploads of site URL information. It was never intended to manage 20 URLs, but rather 20,000 or 200,000 URLs. Spiders and crawlers will find the rest of a site just fine as they have been doing for years.
Joe Payne
AbleCommerce Custom Programming and Modules http://www.AbleMods.com/
AbleCommerce Hosting http://www.AbleModsHosting.com/
Precise Fishing and Hunting Time Tables http://www.Solunar.com
AbleCommerce Custom Programming and Modules http://www.AbleMods.com/
AbleCommerce Hosting http://www.AbleModsHosting.com/
Precise Fishing and Hunting Time Tables http://www.Solunar.com
- Hostmaster
- Commander (CMDR)
- Posts: 126
- Joined: Fri Jan 04, 2008 3:30 pm
- Location: Melbourne Fl
- Contact:
Pete,
You do know that you can add web pages to the store catalog right?
Those would be included in feeds. They won't get added to web.sitemap, but you wouldn't need it at that point. Since they're part of the catalog, they'd be available within AC7 like any other product record.
I never mentioned it before because you were trying to use .Net code in a page. Using the catalog-webpage feature doesn't allow that, but it does allow full HTML content and supports nVelocity scripting.
You might want to play with that route and see if it meets your need - just open any category in your catalog and add a webpage type item. The screens should explain the rest for you.
You do know that you can add web pages to the store catalog right?
Those would be included in feeds. They won't get added to web.sitemap, but you wouldn't need it at that point. Since they're part of the catalog, they'd be available within AC7 like any other product record.
I never mentioned it before because you were trying to use .Net code in a page. Using the catalog-webpage feature doesn't allow that, but it does allow full HTML content and supports nVelocity scripting.
You might want to play with that route and see if it meets your need - just open any category in your catalog and add a webpage type item. The screens should explain the rest for you.
Joe Payne
AbleCommerce Custom Programming and Modules http://www.AbleMods.com/
AbleCommerce Hosting http://www.AbleModsHosting.com/
Precise Fishing and Hunting Time Tables http://www.Solunar.com
AbleCommerce Custom Programming and Modules http://www.AbleMods.com/
AbleCommerce Hosting http://www.AbleModsHosting.com/
Precise Fishing and Hunting Time Tables http://www.Solunar.com