Selected items and ExpressionEngine 1.6.5

Thursday, November 13th, 2008

Version 1.6.5 of ExpressionEngine introduced a new feature that simplifies the use of my Selected Items module.

With the addition of the fixed_order= parameter to the weblog entries tag in EE 1.6.5, you can now use the Selected Items module with EE’s built-in weblog tag features much more easily.

Prior to version 1.6.5 there was no way to arbitrarily specify the order of entries; entries had to be ordered using the orderby= parameter.

Selected items provided a work-around to this, with the side-effect that some of the standard weblog tag variables (such as {count}) were unavailable and required alternative syntax. 

Before:

<ul>
{exp:selecteditems name="Test"}
{exp
:weblog:entries weblog="default_site" entry_id="{selecteditems_id}" orderby="selecteditems"}
<li class="{selecteditems_switch="one|two|three"}">{selecteditems_count}. <a href="{path=home}{url_title}">{title}</a></li>
{/exp:weblog:entries}
{
/exp:selecteditems}
</ul

The fixed_order parameter makes this part of the Selected Items module unnecessary. You can now use the module’s interface to select and order entries and use the standard weblog tag to display them.

After:

<ul>
{exp:selecteditems name="Test"}
{exp
:weblog:entries weblog="default_site" fixed_order="{selecteditems_id}"}
<li class="{switch="one|two|three"}">{count}. <a href="{path=home}{url_title}">{title}</a></li>
{/exp:weblog:entries}
{
/exp:selecteditems}
</ul

See also