Multiple page document - best way with pagination

What is the best way to create a multiple page document with pagination?
MydocPg1
MydocPg2
MydocPg3 etc

Should these all be content items in the same folder? I know it would be “easy” to navigate if they were in subfolders, but feel there must be an intuitive way to have all the pages in one folder. The content type for each page is not necessarily the same, if that matters.

Thanks for any direction in this.

Wendy,
Pagination support was introduced in Version 6.7. See “Adding Paging Support”, p. 167 in the Implementation Guide.

RLJII

Yes, this is different - say I have three very different content items each with their own (also very different) page template.

Now say I want to associate these - and have some “previous page” and “next page” links.

All I can think of is to have a slot that says “where’s your next page” or something similar. Or a slot ib each page to hold some external list of pages and make the proper comparisons.

I was hoping for some easier way to associate them … it’d be nice if the navon had more than the landing page slot for pages, and I could get a list of pages there. But I am not coming up with anything.

Another way to do it, albeit more complicated would be to:

  1. Create a content type…say “indexer” with a slot that allows the various content types and templates
  2. Add the various content items to an “indexer” item.
  3. Create a slot say “pager” and add it to the various content items’ templates
  4. Create a velocity macro to display the next / previous items based on the location of the current item in the “indexer” slot. Put this macro in the template for each content item (that will be in the “indexer” slot)
  5. Add the “indexer” content item to the “pager” slot on the content items placed in the “indexer” slot

One benefit of doing it this way would be that reordering the “pages” would simply mean reordering the items on the “indexer” slot. Doing #4 requires some velocity kung-fu (start with the raw slot macro, determine the index of the current page using velocity count, and the get the items before and after it in the slot). You could also get carried away and support “sub section” where inserting an “indexer” in the slot of another “indexer” causes this behavior…

Of course this is all hypothetical…and yes, the easier way would be to just add the “previous” and “next” slots on each content items’ template.

That is pretty close to how I have done other multi-page docs - so I am adapting that. I have a pagelist content item, slot for pages, and now adding a slot to hold the pagelist on each kind of page that might be included. Yuck.

But I am still thinking of adding that to the navon somehow instead…

This might work! Will post tomorrow if I get it in navon, seems to be working.

Yes, a slot in the navigation would also be a good way to go. I only hesitate modifying the navigation in our implementation because it affects everybody using the system (and some communities may not like the change). Navigation also brings with it it’s own baggage (…which may be helpful :slight_smile: ).

OK, I created a nav snippet ,ciSnMultiPageNav, with slot for “sequenced pages”.
Associated content item for the snippet is rffNav.
Code below.
In the page template that is to use this, put “contentID” in the bindings – $rx.guid.getContentId($sys.item.guid) , and call this slot via:

#slot(“rffNav” “” “” “” “” “template=ciSnMultiPageNav”)

The snippet code:

-------------------------------------------------------

#set($pageContentId = $contentID)## Get from calling page bindings

	
#initslot("ciPageSequenceSlot" "template=ciSnPageLinkOnly")##
    #set($next = false) 
    #set($previousPageString = "(LT)div id='prevPg'(GT) (LT)/div(GT)") 
    #set($nextPageString = "(LT)div id='nextPg'(GT) (LT)/div(GT)") 
     
    #if($sys.currentslot.relresults.size() (GT) 0)
    	#foreach( $relresult in $sys.currentslot.relresults )
    		#set($linkto = $rx.doc.extractBody($relresult))
    		#set($thisTitle = $relresult.node.getProperty("rx:displaytitle").String)##
    		#set($thisCID = $relresult.node.getProperty("rx:sys_contentid").String)##
    		#if($thisCID == $contentID)
     			#set($next = true) 
    		#elseif($next == true)
    			#set($nextPageString = "(LT)div id='nextPg' style='float:right'(GT)(LT)a href='$linkto'(GT)NEXT (GT)(GT)(LT)/a(GT) (LT)/div(GT)")
				#break
			#else
    			#set($previousPageString = "(LT)div id='prevPg' style='float:left'>(LT)a href='$linkto'(GT) (LT)(LT)PREVIOUS</a>(LT)/div(GT)")
     		#end
    
    	#end
			(LT)div id="pagenav" style="clear:both"(GT)
    		$previousPageString
     		$nextPageString
			(LT)/div(GT)
    
    #end
#endslot("ciPageSequenceSlot")