Loading...
 
Skip to main content

Features / Usability


You are viewing a reply to Apply template without removing contents?

Re: Apply template without removing contents?

Urgh, forgot to put CODE tag in...but why I can't edit/remove my previous reply? Here it is again:

OK, I have a raw hack that kinda works. In tiki_editpage.php chage:Image
Copy to clipboard
1. Line 517: (remove the 'preview' check) CHAGE: if (isset($_REQUEST["templateId"]) && $_REQUEST["templateId"] > 0 && !isset($_REQUEST['preview'] && !isset($_REQUEST['save'])) TO if (isset($_REQUEST["templateId"]) && $_REQUEST["templateId"] > 0 && !isset($_REQUEST['save'])) 2. Line 519: (append previous edits) CHAGE: $_REQUEST["edit"] = $template_data["content"]; TO: $_REQUEST["edit"] = $_REQUEST["edit"] . "\n" . $template_data["content"];

It allows template text appended to the end, and you can apply templates multiple times. I just start learning PHP and not familiar with Tiki at all, so I guess it's not a smart hack and might break something else. But it seems to be working on my test site.

Cheers.