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??
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
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 😊
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.