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.

Equivalent for Solspace's Selected for EE2?

August 25, 2010 6:01pm

Subscribe [4]
  • #16 / Aug 26, 2010 4:17pm

    Boyink!

    5011 posts

    But you are linking to a “services_headline” template?

    This isn’t working currently because there is no url_title appearing in the segment_2 position.  My coding approach assumes the left nav links right back to the same template but showing an individual entry.

  • #17 / Aug 26, 2010 5:15pm

    Jack Tse

    67 posts

    But you are linking to a “services_headline” template?

    This isn’t working currently because there is no url_title appearing in the segment_2 position.  My coding approach assumes the left nav links right back to the same template but showing an individual entry.


    The code was stripped in this forum for some reason.

    This is the complete form of the above code.

    <div class="grid_3 alpha omega leftNav">
                    <h3>About</h3>
    <p>                <ul><br />
                        {exp:channel:entries channel="services" dynamic="no" offset="1" sort="asc" disable="pagination|member_data|categories|category_fields"}<br />
                        <li {if segment_2=="{url_title}"}class="leftNav_current"{/if}><a href="http://{url_title_path=services}">{services_headline}</a></li><br />
                        {/exp:channel:entries}<br />
                    </ul><br />
                </div>


    “{services_headline}” is a custom field from the Services channel

  • #18 / Aug 26, 2010 5:20pm

    Boyink!

    5011 posts

    So this is your nav code - I assume you have another weblog entries loop in the main content area?

    Are you getting links?  What happens if you click on one?

  • #19 / Aug 26, 2010 5:32pm

    Jack Tse

    67 posts

    Yes, I’m sorry I didn’t notice before.

    1. Main content and the right sidebar calls it’s own unique loop (all from the same Services channel). Nothing mysterious there. It is self contained and with no hacks.


    2. The Nav works fine, the only thing is that it is not being highlighted like your example website.

    (I always thought that this was how EE worked unless I hard-coded the entire nav.)


    Thanks!

  • #20 / Aug 26, 2010 5:37pm

    Boyink!

    5011 posts

    Whats the URL after you click a navigation link?

  • #21 / Aug 26, 2010 5:38pm

    Aaron Fowler

    113 posts

    Clear cache?  Also, to double-check, just output {segment_2} somewhere.

  • #22 / Aug 26, 2010 5:55pm

    Jack Tse

    67 posts

    Whats the URL after you click a navigation link?


    index.php/services/technical-due-diligence


    I’m using {url_title_path="services"} so it appends the url_title to it. I also used path=“services” as well

  • #23 / Aug 26, 2010 6:00pm

    Boyink!

    5011 posts

    You have:

    <li {if segment_2=="{url_title}"}class="leftNav_current"{/if}><a href="http://{url_title_path=">{services_headline}</a></li>

    Try:

    <li {if segment_2==url_title}class="leftNav_current"{/if}><a href="http://{url_title_path=">{services_headline}</a></li>
  • #24 / Aug 26, 2010 6:01pm

    Aaron Fowler

    113 posts

    Could you post the entire template code?

    [edit]also, what Mike said.  If things like this don’t work, I start adding and removing quotes and brackets…

  • #25 / Aug 26, 2010 6:01pm

    Jack Tse

    67 posts

    Clear cache?  Also, to double-check, just output {segment_2} somewhere.

    I just outputted now and it is working. Cache is cleared - no dice.

    Tried using single quotes vs. double quotes too - no dice.

    thanks, i’m actually investigating your method now again.

  • #26 / Aug 26, 2010 6:03pm

    Boyink!

    5011 posts

    Note on my version I don’t have the braces around the variable names.

  • #27 / Aug 26, 2010 6:06pm

    Aaron Fowler

    113 posts

    I see it’s working 😊

    Mike, do you know if there are any docs/references on when to use/not use brackets?

    Thanks,
    Aaron

  • #28 / Aug 26, 2010 6:07pm

    Jack Tse

    67 posts

    MIKE BOYINK - you are a saint.

    So it looked like the {url_title} vs. url_title did the trick but WHY?! The official documentation is that EE variables is supposed to be inside brackets!

    BTW, thank you so much! I’ll do my best to go buy something at TRAIN-EE this week

  • #29 / Aug 26, 2010 6:08pm

    Jack Tse

    67 posts

    I see it’s working 😊

    Mike, do you know if there are any docs/references on when to use/not use brackets?

    Thanks,
    Aaron


    Thanks to you as well Aaron, I’m actually quite intrigues by the notion of preload_replace and will investigate further.

    pEEpz rock!

  • #30 / Aug 26, 2010 6:13pm

    Boyink!

    5011 posts

    I just followed the examples on the Global Conditional Variables page - where variable inside of conditionals are used without their braces.

    It also suggests words would go in quotes (single or double), but if comparing to a number then no quotes needed.

    Glad you got it working…;)

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

ExpressionEngine News!

#eecms, #events, #releases