Disable page versioning in permalink
Hi Admin,
How can I disable page versioning in WackoWiki so that the permalink does not appear to change when a page is updated?
Thank you.
Comments
Log in or create an account to post a comment.
Hi Admin,
How can I disable page versioning in WackoWiki so that the permalink does not appear to change when a page is updated?
Thank you.
Re: Disable page versioning in WackoWiki
Got it, the solution is to edit action/hashid.php and change the default value from:
if (!isset($version)) $version = 1;
to:
if (!isset($version)) $version = 0;
ChatGPT helped me find this solution :D.
Re: Disable page versioning in permalink
What you wanna achieve? Disable permalink, want that permalink always point to the recent version and not to the current version? Or do you want disable versioning at all. Please clarify.
Re: Disable page versioning in WackoWiki
Hi Admin,
I’m using WackoWiki mainly for personal notes. I update pages quite often, and sometimes I also rename them.
Because of that, I need a permalink that stays the same even after the page is updated or renamed. Otherwise, I have to keep updating the links manually in my other notes or external references whenever the generated permalink changes.
regards,
Re: Disable page versioning in permalink
Change the permalink so it always link to the page and not to the recent version of the page by setting
version=0. The permalink uses thehashidaction.Description: Creates a permalink to the current version of the page or simply to the page itself. Usage: {{hashid}} Options: [version=0|1] 0 - link to the page 1 - link to the current page version (default)[1] Theme footer
In your theme footer you can set the
versionparameter to0.theme/default/appearance/footer.php
// permalink $tpl->perma_link = $this->action('hashid', ['version' => 0]);[2] Action
When using the action in a page:
action/hashid.php
{{hashid version=0}}Re: Disable page versioning in permalink
I am using 6.0.37 version..
Re: Disable page versioning in permalink
Should work in 6.0.37 the same way regarding using
version=0.Good to hear that 6.0.37 works, it was a blind back-port – my testing environment for PHP 7.4 was already gone.
WackoWiki 6.1.0
WackoWiki 6.2.0
WackoWiki 6.3.0
Re: Disable page versioning in permalink
I created a hashlink action. It uses the hashid permalink and automatically displays the page title.
Re: Disable page versioning in permalink
Actions are dynamic and then you can use the page tag and the
link()function forhrefonce you queried the page table, except the case you wanna explicitly a hash link for copy and paste.Additionally you can create a template for the action, that makes it easier to set escapes and modify HTML.
$tpl->fail_id = $id; $tpl->href = $this->href('', $id, '', '', '', false); $tpl->text = $link_text; $tpl->title = $page['title'] ?: $page['tag'];action/template/hashlink.tpl