| Friday 26 September 2008 6:44:13 am 
                                                                 Hi, I tried getting this to work with a custom tag for the xml block. It might work, but you will need to test: to content.ini.append.php, add the following lines: 
[CustomTagSettings]
AvailableCustomTags[]=multipage
IsInline[multipage]=true
[multipage]
CustomAttributes[]=page
 Create a template called 'multipage.tpl' in the folder: \design\[your_design_folder]\templates\content\datatype\view\ezxmltags\  Add the following code to the template 'multipage.tpl': 
<!--page-->
 Create a template called 'ezxmltext.tpl' in the folder: \design\[your_design_folder]\templates\content\datatype\view Add the following code to the template 'ezxmltext.tpl': 
{if $attribute.content.output.output_text|contains("<!--page-->")}
	{def $pages=$attribute.content.output.output_text|explode("<!--page-->")}
	
	{$pages[$DesignKeys:used.view_offset]}
	
	<hr>
	{def $object=fetch('content','object',hash('object_id',$attribute.contentobject_id))
	     $view_parameters=hash('offset',$DesignKeys:used.view_offset)}
	{include name=navigator
		uri='design:navigator/google.tpl'
		page_uri=$object.main_node.url_alias
		item_count=$pages|count
		view_parameters=$view_parameters
		item_limit=1}
{else}
	{$attribute.content.output.output_text}
{/if}
Finally, you would have to modify your existing article template so it displays (for example) only the body xml block, and no other attributes, when your offset is > 0.  
How to use:Go the the edit view for the page. Add a multipage custom tag wherever you want to start a new page.
 
Kind regards,Sebastiaan
 Certified eZ publish developer with over 9 years of eZ publish experience. Available for challenging eZ publish projects as a technical consultant, project manager, trouble shooter or strategic advisor.
 
 |