BreakPage-Talk

Summary: Talk page for BreakPage.
Maintainer: jr
Users: (View / Edit)

This space is for User-contributed commentary and notes. Please include your name and a date along with your comment.

Comments

Sometimes authors would like to be able to break large PmWiki pages into smaller chunks to improve readability. This recipe adds a (:breakpage:) markup to allow an author to specify where to split the page. (:breakpage:) also provides a "Page 1 2 3 ..." set of links at the bottom of each page to allow navigation to other chunks of the page. The bottom of this page demonstrates the use of (:breakpage:) directive.

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 (:breakpage:) when browsing pages; other actions (e.g., ?action=print simply ignore (:breakpage:) directives.

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')
Usage note
If your page also includes (:nogroupheader:) or (:nogroupfooter:) directives, you will need to mention them in each page section. This is because PmWiki processes these after it has processed any (:breakpage:) directives.
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

Talk page for the BreakPage recipe (users).

Array
(
    [post_max_size] => 64M
    [$_POST keys] => 
    [$_REQUEST keys] => n
    [$_SERVER] => Array
        (
            [CONTEXT_DOCUMENT_ROOT] => /home/pmwiki/public_html
            [CONTEXT_PREFIX] => 
            [DOCUMENT_ROOT] => /home/pmwiki/public_html
            [GATEWAY_INTERFACE] => CGI/1.1
            [HTTPS] => on
            [HTTP_ACCEPT] => */*
            [HTTP_ACCEPT_ENCODING] => gzip, br, zstd, deflate
            [HTTP_HOST] => www.pmwiki.org
            [HTTP_USER_AGENT] => Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
            [HTTP_X_HTTPS] => 1
            [PATH] => /bin:/usr/bin
            [PHP_INI_SCAN_DIR] => /opt/cpanel/ea-php70/root/etc:/opt/cpanel/ea-php70/root/etc/php.d:.
            [QUERY_STRING] => n=Cookbook%2fBreakPage%2dTalk
            [REDIRECT_HTTPS] => on
            [REDIRECT_QUERY_STRING] => n=Cookbook%2fBreakPage%2dTalk
            [REDIRECT_SCRIPT_URI] => https://www.pmwiki.org/wiki/Cookbook/BreakPage-Talk
            [REDIRECT_SCRIPT_URL] => /wiki/Cookbook/BreakPage-Talk
            [REDIRECT_SSL_TLS_SNI] => www.pmwiki.org
            [REDIRECT_STATUS] => 200
            [REDIRECT_UNIQUE_ID] => afRJIuJzfsHDv62x7-xEUgAAAUk
            [REDIRECT_URL] => /wiki/Cookbook/BreakPage-Talk
            [REMOTE_ADDR] => 216.73.216.25
            [REMOTE_PORT] => 30807
            [REQUEST_METHOD] => GET
            [REQUEST_SCHEME] => https
            [REQUEST_URI] => /wiki/Cookbook/BreakPage-Talk
            [SCRIPT_FILENAME] => /home/pmwiki/public_html/index.php
            [SCRIPT_NAME] => /index.php
            [SCRIPT_URI] => https://www.pmwiki.org/wiki/Cookbook/BreakPage-Talk
            [SCRIPT_URL] => /wiki/Cookbook/BreakPage-Talk
            [SERVER_ADDR] => 23.254.203.248
            [SERVER_ADMIN] => webmaster@pmwiki.org
            [SERVER_NAME] => www.pmwiki.org
            [SERVER_PORT] => 443
            [SERVER_PROTOCOL] => HTTP/1.1
            [SERVER_SIGNATURE] => 
            [SERVER_SOFTWARE] => Apache
            [SSL_TLS_SNI] => www.pmwiki.org
            [TZ] => America/Los_Angeles
            [UNIQUE_ID] => afRJIuJzfsHDv62x7-xEUgAAAUk
            [PHP_SELF] => /index.php
            [REQUEST_TIME_FLOAT] => 1777617186.3333
            [REQUEST_TIME] => 1777617186
            [argv] => Array
                (
                    [0] => n=Cookbook%2fBreakPage%2dTalk
                )

            [argc] => 1
        )

)