Currentpage HTML Nugget on Page

Creating and modifying plugins.
Post Reply
CABG
Posts: 4
Joined: Thu Jan 10, 2013 10:44 am

Currentpage HTML Nugget on Page

Post by CABG »

Hello I am using HTML Nugget on Page (serendipity_event_page_nugget) for my Blog because I have a multilingual navigation bar. Unfortunately currentpage no longer works on my blog. The first navigation point is always highlighed but rest never is. Hover works though.
How do I have to change the code to fix this?
<div id="sitenav" class="snbelow">
<ul>
<li class="currentpage navlink_first"> <a title="Blog" href="http://blog.goethe.de/treitari/">Blog</a></li>
<li class=""> <a title="Autoren" href="http://blog.goethe.de/treitari/pages/au ... ri</a></li>
<li class="navlink_last"><a title="Übersetzer" href="http://blog.goethe.de/treitari/pages/tr ... ri</a></li>
</ul>
</div>
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: Currentpage HTML Nugget on Page

Post by Timbalu »

You are even lucky that browsers know what you mean to do and render it nearly fine... (please see you source code at http://blog.goethe.de/treitari/)

Please read https://github.com/s9y/additional_plugi ... age_nugget
It is not intended to enter banner or navigation code into the head part of a html page, at last it is not valid HTML. Hmmm, there must be some switch to place this code to the banner part...

I would pled for three things:
  • Upgrade Serendipity. It is outdated. We have said this quite often, having other questions from Goethe here in the past.
  • Fix the other sidebar unclosed tag errors, as also have said before...
  • Put this nav below banner section into your index.tpl and add this into your class="

    Code: Select all

    {if $currpage==$navlink.href or $currpage2==$navlink.href}currentpage{/if}
    and try to add the multilang part there somehow... (this could be done by a templates lang constant for example)
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
Post Reply