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.

how to get the category url title?

April 04, 2011 9:42am

Subscribe [2]
  • #1 / Apr 04, 2011 9:42am

    DoctorLove

    38 posts

    Hello,

    with the code below I ask an entry that needs to be placed in the picture.

    But I need the category url title.
    I would expect a single variable in EE to get the category url, but that’s not the case, right?
    Do I need a custom query to get the category_url_title linked to the entry, or is there another way?

    Thanks

    Regards,
    Vic

    I have the following:

    {exp:channel:entries channel="open_channel_{segment_1}" limit="1" dynamic="no" search:open_inthepicture="yes" }    
    {if title}
        <div>
            <h4>In the picture</h4>
    <p>        <strong>{title}</strong>                <br />
            <a href="/{segment_1}/{segment_2}/{cat_url_title}/{url_title}">more info</a>         <br />
        </div>    <br />
     {/if}<br />
    {/exp:channel:entries}

  • #2 / Apr 04, 2011 3:15pm

    DoctorLove

    38 posts

    apparently you can use the {categories} variable pair between the {exp:channel} channel tag.

    more info here: http://ellislab.com/expressionengine/user-guide/modules/channel/variable_pairs.html#var_categories

    grtz

  • #3 / Apr 04, 2011 4:37pm

    Sue Crocker

    26054 posts

    Looks like you have a workable solution.. Feel free to start a new thread if you have any more questions.

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

ExpressionEngine News!

#eecms, #events, #releases