Tuesday 30 September 2003 8:47:35 pm
Yes, exactly what i did - it was the problem for me - when i click an image the gallery showed images from 1 to 9 for example, the trick i gave above gives the idea - you don't need to deal with any array structures ( actualy i was triyng to implemet this with fetching the current picture's pozition in the gallery, but didn't find way how to do this), so here is a template - it is just remake of standard full.tpl, the main change is fetching list data from parent object rather then from current one, also one more thing - for links make correct offset addition - just add current offset) for exapmle <a href={concat('content/view/full/',$Child:item.node_id,'/offset/',$view_parameters.offset)|ezurl}> Then it will be only one strange thing - when you will list pages your current page will be the same ( i mean the big picture ), if you want change this - remake google.tpl so this is picture.tpl template
{let page_limit=4 list_count=fetch('content','list_count',hash(parent_node_id,$node.parent_node_id))}
{default content_object=$node.object
content_version=$node.contentobject_version_object node_name=$node.name} <html cutted here>
{let children=fetch('content','list',hash(parent_node_id,$node.parent_node_id,sort_by,$node.sort_array,limit,$page_limit,offset,$view_parameters.offset)) }
{section name=Child loop=$children }
<a href={concat('content/view/full/',$Child:item.node_id,'/offset/',$view_parameters.offset)|ezurl}>{attribute_view_gui attribute=$Child:item.object.data_map.image image_class=small }
</a>
{/section} {/let}
<!--including new overriden google.tpl --->
<tr><td colspan=3 height=17 align=center>
{include name=navigator
uri='design:google.tpl'
page_uri=concat('/content/view','/full/',$node.node_id)
item_count=$list_count
view_parameters=$view_parameters
item_limit=$page_limit}
</td></tr> </table>
<!-- current picture is shown big size --> {attribute_view_gui attribute=$node.object.data_map.image} {attribute_view_gui attribute=$node.object.data_map.name}
{/default}
{/let}
|