I am trying to show a list of items (as bookmarked). However, the list only displays one item.

    {if count != ""}
    <div class="widget clearfix">
        <h4>My Bookmarked Items ({total_results})</h4>
            <li>{title} (<a href="{remove_url}">Remove</a>)</li>
    <p>{if no_results}Your list is empty{/if}</p>

There are two items in the list, when seen from the backend. However, only one is getting listed.

  • This seems like a cache problem. File Cache (EE2's default). Shortlist misbehaves when cache is on. When cache is off, everything is red roses! – Noor M Feb 16 '16 at 8:52

Try changing:

{if count != ""}


{if count==1}

Hopefully that sorts it out :) - I noticed that your code was a little different to the docs...

  • I tried another version. It works. However, an entry doesn't get removed properly. <div class="widget quick-contact-widget clearfix"> <h4>My Bookmarked Jobs</h4> <ul class="iconlist"> {exp:shortlist:view} {if count != ""} <li><i class="icon-ok success bold"></i> {title} (<a href="{exp:shortlist:auto_remove}{remove_url}{/exp:shortlist:auto_remove}">Remove</a>)</li> {/if} {if no_results}<li>Your list is empty</li>{/if} {/exp:shortlist:view} </ul> </div> – Noor M Feb 16 '16 at 7:00
  • It removes the item from the control panel, however it is listed in the ul li and also the link at the end shows {remove-url}, which is invalid. – Noor M Feb 16 '16 at 8:15
  • Guessing it is a cache issue. Because it shows/gets removed after a while. It's happening when you add an entry or remove an entry. – Noor M Feb 16 '16 at 8:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.