Alpha pagination of objects

Alpha pagination of objects

Thursday 04 September 2003 12:51:27 am - 21 replies

Author Message

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>&nbsp;|&nbsp;<a href="?filter=b">B</a>&nbsp;|&nbsp;<a href="?filter=c">C</a>&nbsp;|&nbsp;<a href="?filter=d">D</a>&nbsp;|&nbsp;<a href="?filter=e">E</a>&nbsp;|&nbsp;<a href="?filter=f">F</a>&nbsp;|&nbsp;<a href="?filter=g">G</a>&nbsp;|&nbsp;<a href="?filter=h">H</a>&nbsp;|&nbsp;<a href="?filter=i">I</a>&nbsp;|&nbsp;<a href="?filter=j">J</a>&nbsp;|&nbsp;<a href="?filter=k">K</a>&nbsp;|&nbsp;<a href="?filter=l">L</a>&nbsp;|&nbsp;<a href="?filter=m">M</a>&nbsp;|&nbsp;<a href="?filter=n">N</a>&nbsp;|&nbsp;<a href="?filter=o">O</a>&nbsp;|&nbsp;<a href="?filter=p">P</a>&nbsp;|&nbsp;<a href="?filter=q">Q</a>&nbsp;|&nbsp;<a href="?filter=r">R</a>&nbsp;|&nbsp;<a href="?filter=s">S</a>&nbsp;|&nbsp;<a href="?filter=t">T</a>&nbsp;|&nbsp;<a href="?filter=u">U</a>&nbsp;|&nbsp;<a href="?filter=v">V</a>&nbsp;|&nbsp;<a href="?filter=w">W</a>&nbsp;|&nbsp;<a href="?filter=x">X</a>&nbsp;|&nbsp;<a href="?filter=y">Y</a>&nbsp;|&nbsp;<a href="?filter=z">Z</a>&nbsp;|&nbsp;<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}

You must be logged in to post messages in this topic!

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.