[pmwiki-devel] Page specific markups.

Vaibhav Vaish vaibhav.vaish at gmail.com
Tue Sep 4 15:40:17 CDT 2007


  Thanks. I will try out this approach (like EditMore) over the weekend.

  My only worry is wrt order. Since I am still using edit-title etc.
recipes which modify edit form, I have to be careful to not add
(:markdown:) (:markdownend:) tags after (:title:) etc. tags are added.
Else they will go down to markdown engine, not as expected.
  It would have been more convenient to have one "capture all"
reg-exp, and add it as a Markup after the not-to-be-disturbed tags
have been processed. Of course the crux of the problem is that I want
to do it selectively on certain pages, and that too not via a
configuration file. I really wonder if that be possible!

regards,
Vaibhav


On 9/5/07, Dominique Faure <dominique.faure at gmail.com> wrote:
> On 9/4/07, Vaibhav Vaish <vaibhav.vaish at gmail.com> wrote:
> >   This doesn't seem to help because I want the customizations to be
> > per page. Now if I have to create a customization file for every new
> > page created it will ruin the day -- what I want is to be able to save
> > it via the edit form to page details say provide a new variable in the
> > editform "MarkupType".
> >
> >   Say, then a Markup (I don't know what ... like "/^.*/es" ?) should
> > be able to get the whole page and just process it as I want, after
> > reading the options from the relevant page.
> >
> >   Now, if I do add above regular expression above to capture whole
> > page, I must also have some mechanism to know the specific page
> > variable "MarkupType", but html finally displayed consists of various
> > sections. Some section, say taken from Site.Sidebar may have one
> > MarkupType, while others may have some other MarkupType. I do not know
> > how to resolve this, or whether I can at all.
> >    This is the specific thing I want to be able to do.
> >
> >   Also, long back I had asked how to access the field like
> > "MarkupType" like above and was directed to use pagestore, since I
> > found a different approach, I didn't bother much then. But now I am
> > totally confused. Do I need to call ReadPage or ReadAuthPage even for
> > the current page (I need that tricky extra variable MarkupType)? That
> > would place the burden on me to check authority and implement
> > security, so am wary of doing that.
> >
> > regards,
> > Vaiby
> >
> >
> >
> >
> > On 9/4/07, Dominique Faure <dominique.faure at gmail.com> wrote:
> > > On 9/4/07, Vaibhav Vaish <vaibhav.vaish at gmail.com> wrote:
> > > >   I want to add page specific markups to pmwiki.
> > > >   To be more precise, I want to enable standard markups for Site.*
> > > > pages, but for the page specific content, want to be able to have
> > > > different markup like markdown, or just plain html (my users are a
> > > > rather closed group, but some extremely ungeeky, other rather geeky).
> > > >
> > > >    I do not want, if it is not possible, to disable Markups
> > > > explicitly, but just as the markdown recipe does, process the whole
> > > > file by myself. On the page edit form I hope to set an option for the
> > > > same, which I can do just as in edittitle recipe.
> > > >
> > > >   However I do not know where should I trigger the execution of the
> > > > code so that only the relevant part of the page is channeled not the
> > > > headers, footers etc.
> > > >
> > > >   Is it possible to do so?
> > > >
> > > > regards,
> > > > Vaiby
> > > >
> > >
> > > http://www.pmwiki.org/wiki/PmWiki/PerGroupCustomizations
> > >
> > > should provide you some hints...
> > >
> > >
> > > --
> > > Dominique
> > >
> >
>
> In the same page, 5 or 6th paragraph:
>
>   << Per-page customizations. PmWiki also allows per-page
> customizations, simply use the full name of the page to be customized
> instead of the group. For example, one can use the file
> local/Chess.HomePage.php to set local customizations for
> Chess.HomePage. >>
>
> In this configuration file (or at a more global scope), you're free to
> conditionally disable PmWiki standard markup with:
>
>   $EnableStdMarkup = 0;
>
> BTW, you could (more or less) easily use the approach taken by
> EditMore[1] and EditTitle[2] recipes in order to maintain your exotic
> page contents entirely enclosed into (:html:)...(:htmlend:) or
> (:markdown:)...(:markdownend:) section which would be rendred as
> expected using the appropriate recipe[3,4].
>
> [1] http://www.pmwiki.org/wiki/Cookbook/EditMore
> [2] http://www.pmwiki.org/wiki/Cookbook/EditTitle
> [3] http://www.pmwiki.org/wiki/Cookbook/EnableHTML
> [4] http://www.pmwiki.org/wiki/Cookbook/Markdown
> --
> Dominique
>



More information about the pmwiki-devel mailing list