Douglas Hammond
|
Wednesday 01 March 2006 10:04:52 am
This works to sort any folder by the name of it's contents
<h1>{$node.name}</h1>
{let filter=first_set(ezhttp('filter',get),"all")}
{let ffilter=concat($filter,'*')}
{switch match=$filter}
{case match="all"}
{set ffilter="*"}
{/case}
{/switch}
<a href="?filter=a">A</a> | <a href="?filter=b">B</a> | <a href="?filter=c">C</a> | <a href="?filter=d">D</a> | <a href="?filter=e">E</a> | <a href="?filter=f">F</a> | <a href="?filter=g">G</a> | <a href="?filter=h">H</a> | <a href="?filter=i">I</a> | <a href="?filter=j">J</a> | <a href="?filter=k">K</a> | <a href="?filter=l">L</a> | <a href="?filter=m">M</a> | <a href="?filter=n">N</a> | <a href="?filter=o">O</a> | <a href="?filter=p">P</a> | <a href="?filter=q">Q</a> | <a href="?filter=r">R</a> | <a href="?filter=s">S</a> | <a href="?filter=t">T</a> | <a href="?filter=u">U</a> | <a href="?filter=v">V</a> | <a href="?filter=w">W</a> | <a href="?filter=x">X</a> | <a href="?filter=y">Y</a> | <a href="?filter=z">Z</a> | <a href="?filter=all">show all</a><br /><br />
{let page_limit=20
children=fetch('content','list', hash(
parent_node_id,$node.node_id,
sort_by,$node.sort_array,
limit,$page_limit,
offset,$view_parameters.offset,
attribute_filter, array('and', array( 'name', 'like', $ffilter ))
))
list_count=fetch('content','list_count',hash(
parent_node_id,$node.node_id,
attribute_filter, array('and', array( 'name', 'like', $ffilter ))
))
}
{section name=Child loop=$children sequence=array(bglight,bgdark)}
{node_view_gui view=line content_node=$Child:item}<br />
{/section}
{include name=navigator uri='design:navigator/google.tpl' page_uri=concat('/content/view','/full/',$node.node_id)
item_count=$list_count view_parameters=$view_parameters item_limit=$page_limit}
{/let}
{/let}
|