ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

404 issue with categories and template groups

February 15, 2008 12:49am

Subscribe [1]
  • #1 / Feb 15, 2008 12:49am

    JimGoings

    44 posts

    EE 1.6.0 Build: 20070815

    I want friendly URLs with working 404 pages.  Just now getting around to figuring out how to make the 404 page work.  It breaks on my category pages and other places where the template group is not explicitly in the URL.

    My .htaccess is like so:

    RewriteEngine on
    RewriteCond $1 !^(images|d20advanced|downloads|scripts|dnd4sys|themes|img|style|favicon\.ico|robots\.txt|index\.php|index\.html|teaser.jpg|path.php|labels.rdf) [NC]
    RewriteRule ^(.*)$ /index.php/$1 [L]

    I’m using the following code to generate the links for the categories on a post page:

    Tags: {categories}<a href="http://{path=site_index}">{category_name}</a> {/categories}

    I obviously need to get my templategroup name in there, but it’s not clear how to do that.  No matter where I insert, the final result isn’t correct due to the way the engine is creating the links. 

    I thought that if I replaced the path=site_index part that would work, but it’s that exact code that seems to generate the correct category URL.  I can’t prepend or append the template group name.  Is there another method?

    I’m sure this is simple, but it’s eluding me… 😊

    Here’s a link to the post page if you would like to see the links in action.

    Note that I have the 404 turned off atm.

  • #2 / Feb 15, 2008 12:52am

    Lisa Wess

    20502 posts

    Hey, Jim,

    Did you try the example from the docs? There are two, one with site_index and one with the template group and template name.

    {path="weblog/index"}

    where weblog is the template group and index is the template name.

    You can read more about path variables here. =)

  • #3 / Feb 15, 2008 1:00am

    JimGoings

    44 posts

    Look Lisa - Your quick, accurate, and helpful technical support is ridiculous.  You need to work on slowing down, throwing in a cryptic and vague answer or two, and maybe just maybe, be wrong every once in a while.  Sheesh. 😊

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases