Re: Entry name before blog name in the title tag
Thanks shalini. I've found a solution, but I don't know if this is the best...
In my asual-head.vm I've placed this:
(formated for easy reading)
<title>
#set($count = 0)
#foreach($entry in $BLOJSOM_ENTRIES)
#set($count = $count + 1)
#if ($count == 1)
#set($name = $entry.getTitle())
#end
#end
#if ($count == 1 )
$name :
#end
#BlogName()</title>
but in the file is actualy like this, to get rid of the extra space:
<title>#set($count = 0)#foreach($entry in $BLOJSOM_ENTRIES)#set($count = $count + 1)#if ($count == 1)#set($name = $entry.getTitle())#end#end#if ($count == 1)$name : #end#BlogName()</title>
shalini, in order to use $entry.getTitle() I had to use first #foreach($entry in $BLOJSOM_ENTRIES).
Any advices to improve the code above? Or is this the right way?
In the code above I'm counting the number of entries, so in the main page the Blog name comes first. In the individual entries I want the entry.getTitle() followed by the Blog name.