[pmwiki-users] Displaying one page's source markup on another page
Petko Yotov
5ko at 5ko.fr
Mon Oct 27 15:29:40 CDT 2014
Correction:
On 27.10.2014 21:16, Petko Yotov wrote:
> Something like this in config.php may work:
>
> $FmtPV['$Source'] = 'PreserveSource("$group.$name")';
> function PreserveSource($pn) {
> $page = RetrieveAuthPage($pn, 'read', false, READPAGE_CURRENT);
> return "[@{$page['text']}@]";
> }
The return line should probably be more like
return Keep("<pre>{$page['text']}</pre>");
otherwise if the page text contains [@ or @] it may break.
P.
>
> Then in a wiki page, use
>
> {Main.HomePage$Source}
>
> Petko
>
> On 25.10.2014 17:16, Randy Brown wrote:
>> Is there a way for one page to display another page's source markup,
>> without that markup being formatted? I have an edit template page
>> whose unformatted markup I'd like to display on a different page.
>>
>> I can see why such a capability might be a security hole if
>> action=source is restricted, but maybe there is a way to do it via a
>> markup expression that restricts which pages can be displayed.
>>
>> Randy
>
> _______________________________________________
> pmwiki-users mailing list
> pmwiki-users at pmichaud.com
> http://www.pmichaud.com/mailman/listinfo/pmwiki-users
More information about the pmwiki-users
mailing list