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.

Hierarchy & Categories

September 14, 2011 11:15pm

Subscribe [2]
  • #1 / Sep 14, 2011 11:15pm

    JREAM

    16 posts

    I have this setup:

    Category Group: Video
    Inside of Video Category Group: PHP, CSS

    1: I created a regular Entry and assigned it to the CSS category.

    Breakdown:

    Video (Category Group)
    -- PHP (Category)
    -- CSS (Category)
    ---- Entry 'Test' (Assigned to CSS)

    2: I go to my template @ http://jream/ee/site/video (local site)
    3:Within the Site/Video Template: I placed this code n here:

    {exp:channel:categories channel="video" style="linear"}
        <a href="http://{path=channel/index}">{category_name}</a>
    {/exp:channel:categories}

    4: I am getting a list of the categories contained within video, Good.

    So I have a question here..
    1: The link url looks like: http://jream/ee/channel/C14—Why is this? Can I change this to http://jream/ee/site/video/category-title/entry-title.

    2:  I attempted to list all the Entries associated with a Category (Not the category Group) using the {exp:channel:categories category_group=2} tag, however I realize this is accessing the Group, not the category.. It seems I’d have to do a little bit of a jerry-curl trick to accomplish this.

    Could anyone shed some light or let me know if Im going about this a very bad way?

  • #2 / Sep 15, 2011 11:14am

    Boyink!

    5011 posts

    Category url titles are turned on under:

    CP Home > Administration > Global Channel Preferences > Use Category URL Titles In Links?

    To list all entries in a category:

    - First build a template that lists all entries in the channel - using the {exp:channel:entries} tag.

    - Then load that template at a category url—this is done by using the {exp:channel:caetgories} tag pair and using the {path='template_group/template'} variable.  The link EE generates should now include the category url title.

    - When the template that used to show all entries is loaded with a valid category url title showing the {exp:channel:entries} tag will dynamically self-filter to only show entries from that category.

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

ExpressionEngine News!

#eecms, #events, #releases