|
Cookbook /
BreakPageSummary: Breaks pages into sections with inserted markers and displays one section at a time
Status: Stable
Version: 2004-10-20(breakpage.php, 2006-10-28(breakpage2.php), 2005-08-18(break_page.php)
Prerequisites: pmwiki-2.1
Maintainer: jr
Categories: CMS
Download: breakpage.phpΔ
break_page.phpΔ (with editable sections)
Questions answered by this recipeHow can I break long pages into smaller page chunks which can be sequentially displayed as 1, 2, 3, ... DescriptionBy installing breakpage.phpΔ you can add section break markers
Release Notes break_page.phpΔ
Current status (jr 18 Aug 2004):
Alternative: break-page.phpΔThis script uses section break markers of form ==== to create editable page sections, but does not display only one section at a time. In addition optionally headers can be used to form automatic editable sections on the page. Important: Klonk has forked SectionEdit from this script. It is recommended that you switch from break-page to SectionEdit. Though you will get support for break-page all current development resources are going into SectionEdit. Should this go in the Superseded section? - Martin Fick
Changes from the break_page.php script:
if ($action != 'edit') return; into if ($action != 'edit' && $action != 'editpage') return; Version 1.4+ has an auto section function: every header should get an edit section link, if you put $BreakPageAuto = true; in your config.php before the include line. To avoid auto sections for a side (i.e. SideBar) put (:nosections:) on it. If you use auto sections the ==== does only go until the next header element. If an introducing ==== is missing in the header section it is set for the user automaticly. Schlaefer August 31, 2005, at 01:50 AM DiscussionSometimes authors would like to be able to break large PmWiki pages into smaller chunks to improve readability. This recipe adds a Just a thought: maybe "____" (4 underscores by analogy with ----) is worth considering, instead of using a directive. jr
This sounds pretty good to me, perhaps "in addition to" a directive?
This recipe only enables To enable this recipe, simply place the breakpage.phpΔ script in your cookbook/ directory, then add the following line to your config.php: include('cookbook/breakpage.php')
We could always process (:breakpage:) after the (:nogroup(header|footer):) directives. What do you think? --Pm
Not sure, both have pros and contras... --[~Balu]
My thinking was that group headers and footers are not part of the page content and so should always be displayed. Otherwise (assuming headers and footers are normally displayed), page 1 has a header and no footer, page 2 has neither and page 3 has a footer and no header. This seems somehow wrong to me; at the least, it's confusing.
Alternatively, the nogroupheader/footer processing could work on the original page text, rather than the page cutting.--jr
19-Feb-2005 what about i18n? is BreakPage able to use XLPage translating words for "Page" and "edit"? Please adjust it. I don't know how. (i can change it in the source but thats not Wiki-like.) newmy 23.3.206 (:toc:) directive in the beginig of the document shows the headings only of the 1st page, not of the whole document. How to fix it? Jiri March 27, 2005 - Can we have this behaviour added automatically, say, for each first header (h1) and h2? How do you suggest this could be done? A markup change? Thanks --m See SectionEdit
ContributorsSandbox
User notes?: If you use, used or reviewed this recipe, you can add your name. The following format is recognized:
* (+) Optional positive comment. Name, date * (-) Optional negative comment. Name, date These statistics appear in the Cookbook listings and will help newcomers browsing through the wiki. |