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 this to work exp:weblog:entries

November 17, 2011 1:18pm

Subscribe [3]
  • #1 / Nov 17, 2011 1:18pm

    shakabailbonds

    2 posts

    I have a exp weblog entries tag and it pulls the entries by category.  That’s fine and dandy.  The hard part is that it is also pulling a weblog entry from a category that is subbed one level deep.

    Something along these lines

    Cat1 segment_1
      Cat2 segment_2
        Cat3 segment_2

    The only thing is, the exp weblog entries only links to the 2nd segment at the most and not the third.

    I would love add add the actual code here but I just can’t due to the spam filter.


    So here we go

    exp weblog entries category = x
    if page uri != && url_title==‘hard coded url_title here’
    li if url_title==segment_1 && segment_2 ==” class=” current ” /if < a href=”/hard coded url_title/” >Name < / a > < / li >

    if:else

    < li if url_title==segment_2 class= “current” /if >< a href= “/hard coded url_title /” >{ title } < / a >
    {/exp:weblog:entries}

    If you guys can help me figure out how to get the third segment (segment3) to a) show in the same navi but also be linked to the correct entry.  The specific entry I need it linked to is 3 categories deep.

    Most pages are site/segment1/segment2

    I need this code above so that a link can be clicked on and taken to: site/segment1/segment2/segment3

  • #2 / Nov 17, 2011 2:21pm

    What you will likely need to do is set dynamic to no and then pass the segment specifically to the entries tag… give it a shot.

    dynamic="no" url_title="{segment_2}"

    http://ellislab.com/expressionengine/user-guide/modules/channel/channel_entries.html

  • #3 / Nov 18, 2011 12:11am

    shakabailbonds

    2 posts

    Sorry I should have mentioned that I am working with version 1.6.7.

  • #4 / Nov 18, 2011 12:12am

    The only thing that should change then is to use dynamic=“off” instead of dynamic=“no”

    Did that work for you?

  • #5 / Nov 18, 2011 8:34am

    Bromley

    1 posts

    The only thing that should change then is to use dynamic=“off” instead of dynamic=“no”

    Did that work for you?

    I tried it. And it worked. Thank you!:=)

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

ExpressionEngine News!

#eecms, #events, #releases