want to buy, but will it work here? 
Posted: 12 November 2007 06:45 PM   [ Ignore ]
Newbie
Rank
Total Posts:  3
Joined  2007-11-12

Hello,

I am very interested in this plugin/module whatever you call it in EE. However please see the forum post over at the EE forums so you can see my specific delima.

Will this Selected plugin work when listing the categories as links within <li>’s using category_archive?

Please see below link for details.

http://expressionengine.com/forums/viewthread/64711/

I have no problem buying this if it will work in my situation.

Profile
 
 
Posted: 12 November 2007 07:32 PM   [ Ignore ]   [ # 1 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  1833
Joined  2006-10-18

It probably should work. Your menu seems to follow the same guidelines Selected works on.

Give it a try, if it doesn’t work, we’ll refund your money smile

 Signature 
Profile
 
 
Posted: 12 November 2007 10:03 PM   [ Ignore ]   [ # 2 ]
Newbie
Rank
Total Posts:  3
Joined  2007-11-12

Ok i got it, but im not sure how to implement it in my case.

this is what i have so far, but its not working:

<!-- subnav start -->
<div id="subnav">
<!-- CSS submenus -->
{exp:weblog:category_archive weblog="{embed:my_location}"}
{exp:selected item="{segment_1}" replace="id=’current‘“}
<ul<
{categories}
<li<|</li<<li {selected_{category_url_title}}<{category_name}</li>
{/categories}
</ul>
{/exp:selected}
{/exp:weblog:category_archive}
</div>
<!-- subnav end -->

The way my sub menu works is by printing out a list of all the categories in a specified weblog. I want the current category (if a user is on that page) to be blacked out by using an <li id="current">

in this case, the rendered template showes :

<ul id="nav_cat_archive">
<li>
<li>|</li><li {selected_green_your_buildings}>Green Your Buildings</li>
</li>
<li>
<li>|</li><li {selected_green_your_travel}>Green Your Travel</li>
</li>
<li>
<li>|</li><li {selected_green_your_electricity}>Green Your Electricity</li>
</li>
<li>
<li>|</li><li {selected_green_your_car}>Green Your Car</li>
</li>
<li>
<li>|</li><li {selected_green_your_home}>Green Your Home</li>
</li>
</ul>

Profile
 
 
Posted: 13 November 2007 07:26 AM   [ Ignore ]   [ # 3 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  1833
Joined  2006-10-18

Hi adambeazley,

Not sure if it’s just a typo you made on the forum, but some of your UL and LI code brackets are backwards.

Secondly, it appears you have a lot of redundant tags anyway… try something like this:

<ul id="nav">{exp:selected item="{segment_3}" replace="class='selected'"}
{exp
:weblog:category_archive weblog="{my_weblog}"}{categories}
<a href="/test/{category_url_title}/"{selected_{category_url_title}}>{category_name}</a>
{/categories}{/exp:weblog:category_archive}
{
/exp:selected}
</ul>

I managed to get that to work for myself smile

Make sure the segment_3 variable is set to the right segment as well… I’m assuming it would be 3 for you.
You’ll need to modify it a bit to display horizontally as you do on your site, but it shouldn’t be too much further from there.

Let me know where that takes you.

 Signature 
Profile
 
 
Posted: 16 November 2007 07:42 PM   [ Ignore ]   [ # 4 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  700
Joined  2004-03-30

Nice Pie Man,

Also note that the default for the replace parameter is in fact class="selected". So you could omit that parameter as well, and we could add it to the docs. ha ha!

mk

 Signature 

Mitchell Kimbrough

Profile