Create an account to edit articles | See Formatting Syntax for Wiki syntax | We look forward to your contribution!

SEO-friendly Content Pages

Content Pages and Keyword-rich URLs

The SEO files support keyword-rich URLs for Content Pages beginning with version 3.51. If you are running version 3.51, download the latest search engine friendly URL files here and then read this article about properly linking to them in your navigation.

The following applies to users of previous versions of ProductCart and was contributed by Grey Beard Design Group.

Instructions

At this post, TChapin was kind enough to submit revised versions of 404.asp, managecontents.asp and a new page called 404c.asp.

These scripts allow pages created with ProductCart's “Manage Content” feature to be referenced with SEO-friendly URLs.

Following are rough instructions which allowed the above code to be implemented on a v3.5 store.

The assumption is that the static HTML mod has already been installed and is operational. References to the “productcart” folder below should be replaced with the name by which you may have revised that folder in your own installation.

  • Before proceeding, please make backup copies of the following pages:
    • /productcart/pc/404.asp
    • /productcart/pc/viewcontent.asp
    • /productcart/pcadmin/managecontents.asp
  • Copy the revised versions of 404.asp and 404c.asp into the /productcart/pc folder
  • Copy the revised managecontents.asp into the /productcart/pcadmin folder
  • Next, create this folder: /productcart/pc/pages
  • Into the “pages” folder, copy the following files:
    • pcHeaderFooter08.css
    • pcStorefront.css
    • header.asp
    • footer.asp
  • Alter the included header/footer references in viewcontent.asp AND 404c.asp to point to the instances of header.asp and footer.asp in the pages folder:
       <!--#include virtual="/productcart/pc/pages/header.asp"-->
       <!--#include virtual="/productcart/pc/pages/footer.asp"-->

  • And finally, let's update the automatically generated content page links that appear in the left-navigation column of header.asp. This change will need to be tailored for the header.asp in the /pc/ folder, and /pc/pages/ folder, and in the root of the site if you have moved your home page to the root.
  • The stock header.asp file will contain a line of code that looks like this:

    <li><a href="/productcart/pc/viewcontent.asp?idpage=<%=rsSideCatObj("pcCont_IDPage")%>"><%=rsSideCatObj("pcCont_PageName")%></a></li>

  • Replace it with this:

    <li><a href="/productcart/pc/pages/<%=Replace(Replace(Replace(Replace(Replace(rsSideCatObj("pcCont_PageName"),"&",""),"  "," ")," ","-"),".",""),"'","")%>-<%=rsSideCatObj("pcCont_IDPage")%>.htm"><%=rsSideCatObj("pcCont_PageName")%></a></li>

A note about this approach

TChapin's original code references the header/footer files in the PC folder. But in order for ProductCart to correctly generate the store map, and for the header/footer graphics to be properly referenced in the resulting generated page, image and page link references must be relative to the PC folder.

When I first started testing these pages, certain images in the site's design failed to appear. The IMG tag references wanted to be relative to the “pages” folder which is referred to in the instructions above. So instead of changing the header/footer in the PC folder to accommodate this hack, I copied the header/footer files to the pages folder and altered those files to work with the viewcontent.asp page. This was easy and successful.

GBDG