Articles with more than one page.
Articles with more than one page.
So, when making content, it goes into the menu no matter what, right? How can I add conent that is spread across maybe 3 or 4 pages without having all the pages show up in the menu?
Here's sort of how it would go right now:
Main Nav
V
Section
V
Article Page 1
Article Page 2
Article Page 3
Article Page 4
And I'd want it to only show page one, then at the bottom it would have nav links to the next pages in the article. Any idea how to do this?
Here's sort of how it would go right now:
Main Nav
V
Section
V
Article Page 1
Article Page 2
Article Page 3
Article Page 4
And I'd want it to only show page one, then at the bottom it would have nav links to the next pages in the article. Any idea how to do this?
Re: Articles with more than one page.
Yes, you can eliminate a file from the menu! If you go to Content > Pages then go to the page you want to remove from the menu. Click on the Options tab. Uncheck the Show in Menu checkbox.
I believe there's an easy way of creating Next and Previous links, too, but I'm not sure. Maybe one of the other forum members can help you with that.
I believe there's an easy way of creating Next and Previous links, too, but I'm not sure. Maybe one of the other forum members can help you with that.
Re: Articles with more than one page.
Hi Zuke,
You can do next/previous links by using {cms_selflink dir="previous"}and {cms_selflink dir="next"}. You can put this in the page content or use a separate template for those pages and put the cms_selflink tag in that template.
I wish there was a pagination tag that would make several pages of one CMSMS page, by putting a tag like {page_break} where one wants the page breaks to be. But there isn't such a tag yet.
So slloyd's method is probably the only way to do it so far.
You can do next/previous links by using {cms_selflink dir="previous"}and {cms_selflink dir="next"}. You can put this in the page content or use a separate template for those pages and put the cms_selflink tag in that template.
I wish there was a pagination tag that would make several pages of one CMSMS page, by putting a tag like {page_break} where one wants the page breaks to be. But there isn't such a tag yet.
So slloyd's method is probably the only way to do it so far.
Re: Articles with more than one page.
Hmm. Problem with the net page tag is it will take the reader straight out of the article they are reading and onto the next page on the site. Correct?
This workaround also leaves the problem that when I want to move an article or archive it, I actually have to handle each separate page as a separate article, and not a part of the whole.
This workaround also leaves the problem that when I want to move an article or archive it, I actually have to handle each separate page as a separate article, and not a part of the whole.
Re: Articles with more than one page.
Hmm, perhaps it can be done by smartywestis wrote: I wish there was a pagination tag that would make several pages of one CMSMS page, by putting a tag like {page_break} where one wants the page breaks to be. But there isn't such a tag yet.

http://www.phpinsider.com/php/code/SmartyPaginate/
http://jayseae.cxliv.org/2005/03/31/aut ... ation.html
Last edited by cyberman on Tue Jun 27, 2006 5:18 am, edited 1 time in total.
Re: Articles with more than one page.
I'm going to sound like an idiot, but I'm not sure I understand most of those instructions. I'm still trying to hack my way through PHP and whatnot; I haven't even touched the smarty template system that CMSMS uses. If it works, great! If not, I wrap it in {literal}.
The instructions sort of left me behind pretty quickly. Anyway you can translate them into the down and dirty?
The instructions sort of left me behind pretty quickly. Anyway you can translate them into the down and dirty?
Re: Articles with more than one page.
have you tried a selflink to the next page at the bottom of your content, you would have to make all the pages first...
Re: Articles with more than one page.
Well yeah, but as I said above, if I do that, at the end of the article it wouldn't say leading into the NEXT article.
- alinome.net
- Forum Members
- Posts: 124
- Joined: Thu Jan 25, 2007 2:54 pm
Re: Articles with more than one page.
I have a similar problem. I don't want "prev" and "next" links to work outside the current menu branch! It would be very useful {cms_selflink} to have a parameter to limit its scope to a certain parent.
At the end of this post an user suggests his own patch to {cms_selflink} to achieve that (though only for next, not for prev).
Another solution could be to use {menu} instead: you could call {menu} at the bottom of those four pages with the right parameters (e.g. start_level) to show buttons to navigate only through them.
At the end of this post an user suggests his own patch to {cms_selflink} to achieve that (though only for next, not for prev).
Another solution could be to use {menu} instead: you could call {menu} at the bottom of those four pages with the right parameters (e.g. start_level) to show buttons to navigate only through them.
Marcos Cruz
Re: Articles with more than one page.
alby has a pagination tag that uses {page/break} iirc...
The only thing about the menu idea is how to restrict it to only one next/prev. page...
The only thing about the menu idea is how to restrict it to only one next/prev. page...
- alinome.net
- Forum Members
- Posts: 124
- Joined: Thu Jan 25, 2007 2:54 pm
Re: Articles with more than one page.
Right. I thought of as many buttons as pages the document has: [page1] [page2] [page3] [page4]... That can be achieved easily with {menu} but is not what Zuke needed.mark wrote: The only thing about the menu idea is how to restrict it to only one next/prev. page...
These days I found a solution. It's a bit rough, but it works fine. It's not a general solution, but can be adapted to other sites.
The personal site I'm building consists of letters. Every single letter can belong to one or more branches in the hierarchy. To solve that I invented a cross tagging system (I will explain that later in other thread). Well, every menu category is a page that lists all letters under that category, but the letters are all together and apart under an independent menu root parent.
While the user browses letters, I don't want "prev" and "next" go out of the current branch, e.g. to the categories pages, or the "contact" page or whatever.
The solution I found is to capture the output of {cms_selflink} and to print it or not depending on its content.
This is the simple code needed in the template:
Code: Select all
<div id='letternav'>
{capture assign='letter_link'}
{cms_selflink dir="prev" label='Anterior: '}
{/capture}
{letter_link link=$letter_link id='prevletter'}
{capture assign='letter_link'}
{cms_selflink dir="next" label='Siguiente: '}
{/capture}
{letter_link link=$letter_link id='nextletter'}
</div> <!-- letternav -->
Code: Select all
/*
Show a link if it links to a letter page.
*/
$link = $params['link'];
$link_id = isset($params['id']) ? ' id="'.$params['id'].'"' : '' ;
if ( ereg('.*[lc]{1}[0-9]{8}.*', $link) )
{
echo '<div class="letternavbutton"'.$link_id.'>'.$link.'</div>';
}
The filter could be more elaborate, e.g. getting the page parent root, but this one is enough for me.
Last edited by alinome.net on Mon Feb 18, 2008 4:50 pm, edited 1 time in total.
Marcos Cruz