We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 16085
    • 203 Posts
    I’m trying to output a single list of all users, but it’s currently outputting all users into many lists. For example:
    <ul id="posts"> 
    <li><a href="/members/users?service=viewprofile&username=user1">user1</a></li>
    </ul><ul id="posts"> 
    <li><a href="/members/users?service=viewprofile&username=user2">user2</a></li>
    </ul>


    The WebLoginPE call I’m using is:
    [!WebLoginPE? &type=`users` &usersTpl=`membersUsersList` &viewProfileTpl=`membersUsersProfileView`!]

    membersUsersList Template:
    <ul id="posts">
    <li><a href="/[~[*id*]~]?service=viewprofile&username=[+view.username+]">[+view.fullname+]</a></li>
    </ul>

    Obviously if I take out <ul></ul> tags it dumps a <li> list. But I need the <ul id="posts"> tags to be not repeated so it’s:
    <ul id="posts">
    <li>....</ul>
    <li>...</li>
    </ul>
    In the documents it has a &userOuterTpl, but I can’t figure out which way around it is. huh
      • 16085
      • 203 Posts
      Okay I figured it out. smiley

      I basically used the &userList which has an Outer and Template reference. doh!

      In the outerTplChunk:
      <ul id="posts">
      [+view.list+]
      </ul>
      and for the userTplChunk:
      <li><a href="/[~[*id*]~]?service=viewprofile&username=[+view.username+]">[+view.fullname+]</a></li>
      Now gives me <ul id="posts"><li>...</li></ul>

      The above was used along with http://orderedlist.com/demos/quicksilverjs/jquery.html" target="_blank" rel="nofollow">jQuery Live Search Filter as I couldn’t find a quick and simple way of filtering the results without using loads of &userList calls, unless someone can figure my previous post of using a drop select.