We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Structure Help

Development and Programming

glogurl's avatar
glogurl
13 posts
16 years ago
glogurl's avatar glogurl

Heres my dilema…

I’m using structure for a blog in a listing style, which also contains categories. eveything works great except for one minor but annoying detail. On my side navigation I the last li has a border bottonm on it and I don’t want it to, I tried targeting it with a .last but that does nothing I have my nav set up as the following:

<ul class="navigation">
        
        {exp:weblog:categories weblog="blog-content" orderby="title" sort="asc" style="linear"}
              
               <li><a href="http://{path=">{category_name} »</a></li>

        {/exp:weblog:categories}
        
</ul>

so EE is NOT putting a class last on it like it would in structure. how can I get this to work??

       
rockthenroll's avatar
rockthenroll
485 posts
16 years ago
rockthenroll's avatar rockthenroll

Try this: http://studio625.com/ee/classee

       
Mark Bowen's avatar
Mark Bowen
12,637 posts
16 years ago
Mark Bowen's avatar Mark Bowen

Can you not just do this :

<ul class="navigation">
        
        {exp:weblog:categories weblog="default_site" orderby="title" sort="asc" style="linear"}
              
               <li{if count == total_results} class="last" {/if}><a href="http://">{category_name} »</a></li>

        {/exp:weblog:categories}
        
</ul>

Sorry the path part got torn out by the forums but pretty sure that should work if I’m understanding what you want correctly?

You would just then name the class whatever you want and style it differently to the rest.

Hope that’s correct and helps a bit.

Best wishes,

Mark

       
rockthenroll's avatar
rockthenroll
485 posts
16 years ago
rockthenroll's avatar rockthenroll

Errr oh yeah haha… Mark Bowen wins with the best option! I knew there was a way with matching results, but couldn’t remember the code to save my life!

       
Mark Bowen's avatar
Mark Bowen
12,637 posts
16 years ago
Mark Bowen's avatar Mark Bowen
Errr oh yeah haha… Mark Bowen wins with the best option!

Nah have to disagree there. There’re so many ways of doing things in ExpressionEngine that my way is really only one of them. That plugin is definitely a great plugin to use if needed as well. I suppose it might add a teensy weensy bit of overhead with the plugin call but I’m sure it wouldn’t be too much and it’s a really neat one that. I just remembered about that plugin just a few months back and needed to do something along these lines (although a little more complex) and it was fantastic for it.

So yep my way is one way of doing things but there are probably about another 100 ways of doing it too 😉 so the plugin was definitely a good option too 😊

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.