[pmwiki-users] PageDirectives, suggestions

Petko Yotov 5ko at 5ko.fr
Thu Jul 5 02:23:56 PDT 2018

On 05/07/2018 07:49, Pierre-Marie CARETTE wrote:
> I Wish use :
> (:noprinted:) not printed text but visible text, it's not a comment
> (:noprintedend:)
> or
> %noprinted% not printed text but visible text, it's not a comment %%

Add to pmwiki/pub/css/local.css this block:

@media print {
   .noprinted { display: none; }

And in a page use %noprinted%...%% in a line or >>noprinted<<...>><< for 

> (:noprint:) this page will be not printed. (useful in a pagelisted 
> page)

Do you have a pagelist, and wish to exclude some entries (pages) from 
printing but still show these on screens?

There are more than one ways to do it, you could add a PageTextVariable 
in the individual page, for example:


Then in your pagelist template, right after "template each" use a 
conditional like this:

(:template each:)
(:if44 equal "{=$Printable}" "no":)
(:div44 class=noprinted:)
...rest of your template...

...than at the bottom of "template each"

Use if44 and div44 in the template if you have other conditionals or 
divisions that will need to become nested.

You don't need to add (:Printable:yes:) to printable pages, only 
(:Printable:no:) to pages that don't need to be printed. Case sensitive, 
use "no" and not "NO" or "No".


More information about the pmwiki-users mailing list