Log in | Register | Lost password

Bottom
how to have -No results found- in a template
  • Posted: 06.12.2006, 22:17
     
    Converted
    rank:
    12
    registered:
     March 2009
    Status:
    offline
    last visit:
    Posts:
    0
    hi!
    i'm trying to make a code snippet in order to have something as "no results found" in a pub-list view, when i've got no element in a list (for example for PostCalendar events or in Knowledge Base).

    i was figuring out something like 2 Column List
    (http://www.pagesetter.net/index.php?module=pagesetter&func=viewpub&tid=4&pid=80)

    in list-header.html: add
    < ! - - [ counter start=0 skip=1 assign=pub_newscount ] - - >

    in list.html
    < ! - - [ counter assign=pub_newscount ] - - >

    but what to do in list-footer.html?
    i was trying something as
    < ! - - [ if $pub_newscount gte 1 ] - - >bla bla
    < ! - - [ else ] - - >No results found, try again...
    < ! - - [ / if] - - >

    but it seems not to work (also with gte "1", of course).
    any ideas?

    thanks!





    edited by: marcolinux, Dec 12, 2006 - 05:40 PM
  • Posted: 07.12.2006, 11:13
     
    Converted
    rank:
    12
    registered:
     March 2009
    Status:
    offline
    last visit:
    Posts:
    0
    seems a solution could be counting results=count the size of the array?!
    http://www.elfi…ght=no+results
    but... how?

    thanks!
  • Posted: 12.12.2006, 17:24
     
    Converted
    rank:
    12
    registered:
     March 2009
    Status:
    offline
    last visit:
    Posts:
    0
    another question...
    how does list works? it seems to me that

    Code

    <!--[counter assign=pub_newscount]-->

    in list_footer

    Code

    <!--[$pub_newscount]-->
    give me "0"...

    any idea?



    edited by: marcolinux, Dec 13, 2006 - 10:09 AM
  • Posted: 13.12.2006, 20:55
     
    Converted
    rank:
    12
    registered:
     March 2009
    Status:
    offline
    last visit:
    Posts:
    0
    http://www.page…b&tid=4&pid=63

    just look around :-D

    but it works only with list, not in block view...

    pleeeease, anybody can take a look at this?





    edited by: marcolinux, Dec 13, 2006 - 09:59 PM

Template courtesy of Designs By Darren.