Hey so I am working with Middleman and I have been able to add a active class to the menu navigation depending if your on the page or not. So this works fine but not I have a News link in the navigation which takes you to a news overview page (this turns active) but I have a read more that takes you to a single news post. When it does this the News link is not active anymore because it thinks its not on this page anymore.
My folder structure is
aktuelles
– index.html.erb (overview of all news articles)
– kuendigungsschutz-fuer-geschaeftsfuehrer (single news article)
---- index.html.erb
So I have provided some images. First shows the overview page and the aktuelles is highlight because we are on that page. But when you click the news article to read more you can see on the next image, aktuelles is not highlighted anymore and I would like it do be not sure how to do this. A helper in the config.rb but not sure what.
this is what I have for the navigation in the header
<li>
<a class="<%= is_page_selected("/aktuelles/") %>"
href="/aktuelles">Aktuelles</a>
</li>
this is what I have for the a href when you click on the news article to read the whole thing.
I’m guessing something in this a href needs to change to make the aktuelles stay active when you click on this link?
<a class="teaser container" href="kuendigungsschutz-bei-kleinbetrieben-im-falle-einer-regelmasigen-beschaeftigung-von-leiharbeitnehmern">
<sup>10.11.2015</sup>
<h5 class="teaser__title mart-1">Kündigungsschutz bei Kleinbetrieben im
Falle einer regelmäßigen Beschäftigung von Leiharbeitnehmern
</h5>
<p>Arbeitnehmer haben nur dann Kündigungsschutz, wenn deren
Arbeitsverhältnis länger als 6 Monate besteht und der Arbeitgeber in der
Regel mehr als 10 vollzeitbeschäftigte Arbeitnehmer beschäftigt.
</p>
<p class="teaser__link">weiterlesen</p>
</a>
Any help would be much appreciated