3
Mithrandir,
Thank you again for your expert advice! I had to play with your advice a little since I didn't completly understand it first...
I found some of your other advice on the forum and thought that perhaps you had placed the <{counter}> in the wrong place when offering me your help.
Here's the link to Mithrandir's other advice in case someone else is reading this post:
https://xoops.org/modules/newbb/viewtopic.php?topic_id=16684&forum=20I am also going to explain briefly what I did and also post my code.
Basically, I didn't understand the counter assign parameter and had to do some study on Smarty's website:
http://smarty.php.net/manual/en/language.function.counter.phpWhat I realized is it doesn't matter what name I assign the counter. So I chose my own name.
I also couldn't get the prper numbers and hence my unique first article didn't show up the way I wanted. Therefore I tried to see what numbers I got out by using this in my template:
<{$storycount}>
And for some strange reason my first article had a number of 2 and my second a number of 3.
I managed to change this by adding to the counter assign these parameters: start=1 skip=1 (see Smarty website).
With that said...My unique recent news block article template looks like this:
Quote:
<{counter assign="storycount" print=false start=1 skip=1}>
<{foreach item=news from=$block.stories}>
<{if $storycount == 1}><{$news.artimage}><{$news.title}> : <{$news.introtext}>[read more] (<{$news.date}>)
Other new headlines:
<{/if}><{if $storycount > 1}>-<{$news.title}> (<{$news.date}>)
<{/if}>
<{counter}>
<{/foreach}>
My website is not done yet so I can post a link but will do so another day.
Hopefully this helps someone else!
Thanks!