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.

Category Archive URL Parsing

March 01, 2011 11:32am

Subscribe [2]
  • #1 / Mar 01, 2011 11:32am

    Matthew Spiel

    47 posts

    Ok, here is the set up:

    I am using the standard category archive tag to build a simple drop down menu. This would be one sample of the code…

    <ul class="sub">
        {exp:channel:category_archive channel="sub-page" show_empty="yes" show="4" class="no-bull" style="linear"}
            {categories}
                <li><h3>{category_name}</h3><p></li><br />
            {/categories}</p>
    
    <p>        {entry_titles}<br />
                <li><a href="http://{entry_id_path=youth-development/page}">{title}</a></li><br />
            {/entry_titles}<br />
        {/exp:channel:category_archive}<br />
    </ul></p>
    
    <p><ul class="sub"><br />
        {exp:channel:category_archive channel="sub-page" show_empty="yes" show="5" class="no-bull" style="linear"}<br />
            {categories}<br />
                <li></p><h3>{category_name}</h3><p></li><br />
            {/categories}</p>
    
    <p>        {entry_titles}<br />
                <li><a href="http://{path=youth-development/page}">{title}</a></li><br />
            {/entry_titles}<br />
        {/exp:channel:category_archive}<br />
    </ul>

    Here is what I can’t figure out… category 4 is parsing my urls with a number at the end, like this: http://www.domain.com/index.php/youth-development/page/6

    And category 5 (and all subsequant uses of this here after in my code) are parsing the url with the entry title at the end… like this: http://www.domain.com/index.php/youth-development/page/url-entry-title

    I would LOVE for this to be consistant! And I woud love even more for this to be the latter, where it parses the full url, and not the number of obvious reasons.

    Any help as to what I might be doing wrong, or am missing is very very welcome!

    I am working on EE version 2.1.3 Build 20101220.

  • #2 / Mar 01, 2011 9:27pm

    Cheif

    626 posts

    You seem to be using 2 different tags

    //This will use the entry_id_path ie. "6"
    {entry_id_path='youth-development/page'}
    
    //This will use the title option ie. "url_entry_title"
    {path='youth-development/page'}
  • #3 / Mar 01, 2011 9:39pm

    Matthew Spiel

    47 posts

    Cheif, that fixed it. thank you. I knew a fresh set of eyes would help.

  • #4 / Mar 02, 2011 1:24pm

    Sue Crocker

    26054 posts

    Thanks for the assist, Cheif.

    Matthew - Don’t hesitate to post again as needed.

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

ExpressionEngine News!

#eecms, #events, #releases