[pmwiki-users] Is it possible? Draft Page indication and cross reference

H. Fox haganfox at users.sourceforge.net
Wed Jul 4 14:39:40 CDT 2007


On 7/4/07, Crisp, Steve [UK] <SCRISP at ngms.eu.com> wrote:
> All,
>
> I am using pmwiki-2.2.0-beta54 with the new EnableDrafts feature.  This
> works really well however I'd like to know if the following capability
> is available/possible.  Below assumes you have a 'published' page and a
> draft page saved (as work in progress)
>
> 1. Draft page indicator - From the published page have a link/indication
> that a draft page exists.  One example could be an asterix (*) next to
> the page title marking a draft exists.  Clicking the asterix would take
> you to view the latest draft.

It's possible to test if a draft exists

   (:if exists {$FullName}-Draft:)
   [-''(A draft version of this page exists.)''-]
   (:if:)

Or you can put this in config.php

   $pagename = ResolvePageName($pagename);
   if (CondAuth($pagename, 'edit')
     && PageExists($pagename.'-Draft')) { $EditDraft = TRUE; }

and use this in your SideBar

   (:if enabled EditDraft:)
   [-([[{*$FullName}-Draft | View draft ]])-]
   (:if:)

> 2. Draft caveat - When viewing a draft page, could the page title
> (:title:) be appended with 'DRAFT' in red?

This would require modifying the skin.

Hagan



More information about the pmwiki-users mailing list