New Plugin: Page Field
Posted: 16 February 2007 11:52 AM   [ Ignore ]  
Summer Student
Total Posts:  20
Joined  02-08-2007

I created a plugin to split a field into multiple pages, without having to do the multi_field pagination trick.
Your URLs will look like http://yoursite.com/site/this-is-the-entry/3

Where this-is-the-entry is your entry, and 3 is the page number. You can split a field into as many pages as you want, it works similar to how Word Press pages an entry into multiple pages. Its meant to be used on only one field like {body} and only on a single entry page.

You can have numbered page navigation, or just next/previous links.

Here is the example code:
{exp:page_field page="{segment_3}" backspace="2"}
{body}

{page_navigation}
<p>total is: {total}</p>
<p>{num_pages}<a href=’{page_num}’>{page_num}</a> | {/num_pages}</p>
<p>
{if has_previous}
<a href=’{title_permalink={my_template_group}/index}{previous}’>Previous</a>
{/if}
{if has_next}
<a href=’{title_permalink={my_template_group}/index}{next}’>Next</a>
{/if}
</p>
{/page_navigation}
{/exp:page_field}

I’ve also included a tiny_mce plugin to make insertion of the required <!--break--> snippet easier.

If you have any problems or suggestions just send me an email: kenrick@thebusypixel.com

File Attachments
page_break plugin.zip  (File Size: 15KB - Downloads: 248)
Profile
 
 
Posted: 04 November 2007 03:34 PM   [ Ignore ]   [ # 1 ]  
Research Scientist
Avatar
RankRankRankRankRankRank
Total Posts:  5957
Joined  08-04-2002

Hmmmm… Surprised nobody has commented on this...looks handy. I haven’t had to split an entry yet, most of my clients have professional writers/editors and keep things in check but if/when I do I’ll give this a whirl.

Profile
 
 
Posted: 31 March 2008 10:58 AM   [ Ignore ]   [ # 2 ]  
Lab Assistant
RankRank
Total Posts:  141
Joined  03-05-2008

Great!

Profile
 
 
Posted: 02 April 2008 04:40 PM   [ Ignore ]   [ # 3 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  827
Joined  01-24-2006

Nice one!… I don’t have a site that needs this yet but I’m sure it will come up smile

 Signature 

leevigraham.com

VIEW ALL MY EE ADDONS!!

LG Polls 1.6
LG Better Meta 1.6
LG Twitter 2.0
LG Addon Updater 1.0
LG TinyMCE 1.3.0

Profile
 
 
Posted: 02 April 2008 05:25 PM   [ Ignore ]   [ # 4 ]  
Lab Assistant
RankRank
Total Posts:  141
Joined  03-05-2008

I got in touch the original plug-in developer, and he suggested that the combination of the simple-pagination plug-in with the TinyMCE pagebreak plug-in might be more supported over time.

I’m still experimenting.

As a newbie, I have to repeat that I am truly impressed with the active involvement of developers ...

Profile
 
 
Posted: 15 July 2008 11:58 AM   [ Ignore ]   [ # 5 ]  
Summer Student
Total Posts:  20
Joined  02-08-2007

you can add this to line 65 if you are getting the page_navigation bug:

$text = preg_replace("/”.LD."page_navigation”.RD."(.*?)”.LD.SLASH.’page_navigation’.RD."/s", “”, $text);

Profile
 
 
   
 
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 1149, on July 16, 2007 10:33 AM
Total Registered Members: 60731 Total Logged-in Users: 31
Total Topics: 73197 Total Anonymous Users: 23
Total Replies: 394749 Total Guests: 527
Total Posts: 467946    
Members ( View Memberlist )
Newest Members:  rezvani63LambergbcurranChethansisiharmonijoe_carneypsykonautJitsunROPasterfredpws