We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 37758
    • 73 Posts
    Hi,

    Using articles to display news items and for latest vacancies. I'd like to be able to use an odd/even template and would also like to display a 'no results' message if there are no articles, i.e. they have all been unpublished or expired? I have used a chunk to template my front display, but didn't find a chunk option for odd/even?
      • 5430
      • 247 Posts
      If you're using repeating classes or elements and you simply want to style them differently jQuery would be one solution. (see http://api.jquery.com/odd-selector/), or just the CSS nth-child selector -- as in
      p:nth-child(odd)
        • 37758
        • 73 Posts
        thanks for the reply - I am looking for a class based solution rather than javascript and older browsers don't necessarily support nth child, but good ideas anyway.