Skip to content

Feature: @OLDREVISIONS@ placeholder for page changelog - #547

Open
eduardomozart wants to merge 3 commits into
splitbrain:masterfrom
eduardomozart:feature-old-revisions
Open

Feature: @OLDREVISIONS@ placeholder for page changelog#547
eduardomozart wants to merge 3 commits into
splitbrain:masterfrom
eduardomozart:feature-old-revisions

Conversation

@eduardomozart

@eduardomozart eduardomozart commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

This PR introduces a new @OLDREVISIONS@ placeholder that can be used in headers, footers, or cover pages.

When used, it dynamically renders an HTML table containing the changelog of the exported page. By default, it displays up to the last 50 revisions. You can also specify a custom limit by providing a number in parentheses, such as @OLDREVISIONS(10)@, to show a specific number of recent revisions. The table includes the date, author, and edit summary for each revision.

This feature is especially useful for generating official documentation PDFs that require an embedded revision history.

Sample: https://github.com/eduardomozart/ScriptUtil/blob/master/Scripts/DokuWiki/dw2pdf/nethouse/citation.html

image

Replace the static @OLDREVISIONS@ placeholder with a dynamic version supporting an optional numeric limit: @OLDREVISIONS(N)@. Defaults to 50 if no limit is specified. Updated README to document the new syntax.

@Klap-in Klap-in left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you test this? On an older DokuWiki version? On Mort it did not run.
I think the suggested newer functions are already in Librarian.

Comment thread src/Template.php Outdated
Comment thread src/Template.php Outdated
Comment thread src/Template.php Outdated
Comment thread src/Template.php
@eduardomozart
eduardomozart requested a review from Klap-in July 23, 2026 21:08

@eduardomozart eduardomozart left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I've tested it in an older DokuWiki version; I think that on DokuWiki Kratos (Yes, that misspelling was my fault, haha) XD
I only separated the PRs; I didn't get to test it on Mort. I updated the code to the Mort release, thank you for helping to port it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants