while trying to format the most recent entry on the start page with a special CSS attribute, eg. font-weight: bold;, I'm stumbling upon the question on how to identify this most recent entry?
You can format the first article on any page via a small tweak in your entries.tpl, but it's not so easy to really fetch the most recent article timestamp, for that you'd need an event plugin.
Maybe displaying the first entry is easiest to achieve, then you only need to check your entries.tpl and use {if $smarty.foreach.(loopname).first}class="first"{/if} in the <div> construct; replace "loopname" for the {foreach item=$entries name="LOOPNAME"}.
HTH,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
So it's all about smarty and the loop ... and no simple solution (for me).
Since we do only need the very first (the most recent) entry on the start page with a special CSS class, your {if $smarty.foreach.(loopname).first}class="first"{/if} could help, I think.
Unfortunately, my trials did always end up in Smarty errors (due to missing knowledge on my side).
I stop my trials for today, and read something about Smarty and its loops, maybe I have better luck on the next day ...
Thanks anyway,
Achim
www.ms-reporter.de
Pharma-unabhängige Infos für Multiple Sklerose-Betroffene schnellze.it
Einzigartiges Zusammenspiel aus Popfetcher und s9y
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
There's always the option to use an individual start page instead, i.e. an index.tpl which doesn't pull the selected number of entries but uses serendipity_fetchPrintEntries command(s) to pull articles. The Mimbo template is an example for this technique.
Hello there,
thanks you so much for your answers -- I'm afraid that a s9y-creation is good for programmers and not so good for content developers with less coding skills
Looking in the mimbo templates code, I read so much smarty code that is more a problem than that it helps me -- just another signal for me to learn more about smarty.
As the required special treatment for the most recent post is only one feature of several that I have to create, so I'm now trying my luck in other construction areas -- those require the next forum question
But one day, I will come back to the recent post subject and I'm willing to solve it in the future. (= learn Smarty)
Regards,
Achim
www.ms-reporter.de
Pharma-unabhängige Infos für Multiple Sklerose-Betroffene schnellze.it
Einzigartiges Zusammenspiel aus Popfetcher und s9y
aschlemmer wrote:I'm afraid that a s9y-creation is good for programmers and not so good for content developers with less coding skills
I am really not a programmer myself, but Smarty isn't that hard if you have some time to get into it. And it gives you great tools to accomplish almost anything.
aschlemmer wrote:Looking in the mimbo templates code, I read so much smarty code that is more a problem than that it helps me -- just another signal for me to learn more about smarty.
Yes, Mimbo is rather sophisticated templating It is most definitely not an ideal place to start getting into advanced templating, that would be the documentation on s9y.org and/or the Smarty docs.