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.

Items from same category on comments page

August 27, 2007 3:18pm

Subscribe [1]
  • #1 / Aug 27, 2007 3:18pm

    Simon Cox

    405 posts

    I have a single entry page (comments page) that I would like to show links to all the other items in the same category at the base of the page. I did read on the forum that someone had done this but it was not what they were trying to do - but I couldn’t find any threads on this (I must be using the wrong search terms).

    Is this possible to achieve or does the dynamic navigation not understand the category of the single entry?

  • #2 / Aug 27, 2007 3:51pm

    Lisa Wess

    20502 posts

    How about related categories mode, Simon?

  • #3 / Aug 27, 2007 7:08pm

    Simon Cox

    405 posts

    Thanks Lisa - exactly what I needed - and I only read through it on Friday!

    I have put it int the tag on the single entry page but now three things are happening that I was not expecting.
    1. My nice new shiny Dirify plug-in no longer works (cleans the input field) once the related_categories_mode=“on” parameter is used,
    2. The Next/Previous links, that I have used further up the page, no longer remain in the category we are supposed to be in - instead of not having a ‘next’ link on the latest entry it does have one and it is linked to the next category. 
    3. The guide says the that the limit= parameter will default to 100 but the related_categories_mode=“on” defaults to a limit of 10 and it seems that this the limit=”” default is overridden so you have to use a value. This one is more of an observation and as you can see in the code below was easy to remedy.
     

    I think I have the code correct now but can someone give it the once over please.

    {exp:weblog:entries related_categories_mode="on" limit="100"  weblog="1" orderby="product_number" sort="desc" }
    <li><a href="http://{title_permalink=/site/single_entry/}">/images/{exp:dirify input=</a></li>
    {/exp:weblog:entries}
.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases