[pmwiki-users] (:noleft:) also for MyPage?action=edit

ABClf languefrancaise at gmail.com
Sun May 3 18:41:01 CDT 2015


I just read http://www.pmwiki.org/wiki/Cookbook/LayoutEditModified which is
of help :

global $action;
  if ($action=='edit') { SetTmplDisplay('PageHeaderFmt', 0);
 SetTmplDisplay('PageFooterFmt', 0);
 SetTmplDisplay('PageTitleFmt', 0);
 SetTmplDisplay('PageLeftFmt', 0);
};

May I suggest the edit page to inherit the original directives ?

Gilles.

2015-05-04 1:24 GMT+02:00 ABClf <languefrancaise at gmail.com>:

> Erik, (:noleft:) is a skin directive which permits to finely adapt some
> parts of your template according to your special needs (usual usage is show
> or dont show sidebar, actions list, footer, search form, title – up to you
> to define other parts –, on a set of pages, if conditional rules allowed :
> read http://www.pmwiki.org/wiki/PmWiki/SkinTemplates for more). It is not
> a security related tool like what you are setting up for running a cms like
> website (show or not something according to authrorization level). By the
> way, on the site I'm playing with currently, I'm not using authuser yet.
>
> Indeed Randy, playing with another CSS would probably work ; at a cost
> because this alternative is not as convenient nor flexible as a directive.
>
> No matter what, thank you for your friendly advices :)
>
> To me, the question remains : why does an edit action page still show
> pageleft when there is a (:noleft:) directive ?
> Please note, in config.php, these two lines don't work the same way :
>
> #code1
> SetTmplDisplay('PageLeftFmt', 0); #this code removes left content from
> everywhere, ?action=edit included
>
> #code2
> Markup('noleft', 'directives', '/\\(:noleft:\\)/e',
> "SetTmplDisplay('PageLeftFmt', 0)"); #this code removes left content from
> viewed page, but doesnt remove left content for ?action=edit page.
>
> So, it appears that something is happening with the way skin directives
> are used in the action pages. I dont know if that is the expected behaviour.
>
> Gilles.
>
>
>
> 2015-05-03 19:24 GMT+02:00 Randy Brown <randy at brownragfilms.com>:
>
>> If you can’t find a better solution, you can always specify a skin
>> template file that omits one, then select the skin through the
>> configuration file. This would let you use whatever logic you want when
>> choosing whether to include the sidebar.
>>
>> Hope that helps,
>>
>> Randy
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.pmichaud.com/pipermail/pmwiki-users/attachments/20150504/526facea/attachment.html>


More information about the pmwiki-users mailing list