So, I have 2 questions, hope someone can shed light on.
1. is it possible to use a category loop for navigation, and highlight the active state?
For example:
{exp:channel:categories channel="article" show_empty="no" style="linear"}
<li class="{if segment_2 == "category"}selected{/if}"><a href="http://{path=%27articles/index%27}" title="{category_name}">{category_name}</a></li>
{/exp:channel:categories}Obviously the above is a fail, but you can get an idea of what I am trying to do. The only way I can figure how to pull this off is to hard code each entry. Which defeats the purpose of the loop.
2. Is there a way or method to get the current url?
Here is my situation, I have a newsletter signup form (freeform pro) in the footer of the page. this is an include (embed=embeds/.footer) - and I cannot get freeform pro to stay in one spot upon validation. it always jump to the top of the page. So I have added the from validation error at the top of the page, however, freeform requires a return page for errors. I’d like to keep the user on the same page.
The line of code in question is:
inline_error_return="home"Home needs to be like “current URL”
Is this at all possible?
Thanks