What is the best way to create a multiple page document with pagination?
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.
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:
Create a content type…say “indexer” with a slot that allows the various content types and templates
Add the various content items to an “indexer” item.
Create a slot say “pager” and add it to the various content items’ templates
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)
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…
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 ).
OK, I created a nav snippet ,ciSnMultiPageNav, with slot for “sequenced pages”.
Associated content item for the snippet is rffNav.
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: