We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 25420
    • 74 Posts
    ok got it smiley

    On the same subject, I want to create a drop down list that will contain the years of my news. And be able to switch from one year to another (my news are not filtered by month). Is there a way of doing that ? I tried using tplContainer and tplYear. I put the following in tplContainer :
    <select name="allnews_year" onchange="changeNewsYear();">
        [+archive_items+]
    </select>
    


    and in tplYear:

    <option value="[+year+]">[+year+]</option>
    



    which gives the following output:
    <select name="allnews_year" onchange="changeNewsYear();">
        <ul class="reflect_archive"><li class="reflect_year"><option value="2007">2007</option>
    
    <ul><li class="reflect_month"><a href="/fkm/index.php?id=67&reflect_10_month=4&reflect_10_year=2007&reflect_10_day=false&reflect_10_start=0" title="April 2007" class="reflect_month_link">April</a>
    <ul class="reflect_items">
    <li class="reflect_item"><a href="index.php?id=66" title="news 1" class="reflect_item_link">news 1</a> (<span class="reflect_date">24-Apr-07 13:19</span>)</li><li class="reflect_item"><a href="index.php?id=65" title="news 2" class="reflect_item_link">news 2</a> (<span class="reflect_date">24-Apr-07 13:17</span>)</li><li class="reflect_item"><a href="index.php?id=64" title="Back home" class="reflect_item_link">Back home</a> (<span class="reflect_date">24-Apr-07 12:07</span>)</li></ul></li></ul><ul><li class="reflect_month"><a href="/fkm/index.php?id=67&reflect_10_month=5&reflect_10_year=2007&reflect_10_day=false&reflect_10_start=0" title="May 2007" class="reflect_month_link">May</a>
    
    <ul class="reflect_items">
    <li class="reflect_item"><a href="index.php?id=74" title="another news in may" class="reflect_item_link">another news in may</a> (<span class="reflect_date">05-May-07 19:55</span>)</li></ul></li></ul></li></ul>
    </select>
    
    



    The output of tplContainer is correct, but obviously the tplYear is not. Is there any way to get rid of the <ul> and <li> tags, and to avoid months getting displayed as well ? I guess I’m gonna need to hack the snippet but want to make sure first.

    thanks a million

    seb
      • 18397
      • 3,250 Posts
      Yes there is in the current dev version. Its output is 100% templateable. You can get a copy from the link in my signerature.