[pmwiki-users] Why does this not work ? %center% %newwin% %width=100px% [[http://www.pmwiki.org|images:/image.png]]

Petko Yotov 5ko at 5ko.fr
Tue May 24 03:27:57 CDT 2011

On Tuesday 24 May 2011 08:02:50, Christophe David wrote :
>    - center (%center%) a link/image specified using a InterMap
>    - set its width to 100 pixels (%width=100px%)
>    - AND have the target open in a new window  (%newwin%)
> It should look like
>     %center% %newwin% %width=100px% [[http://www.pmwiki.org
> |images:/image.png]]
> Unfortunately, the %newwin% does not appear to work in this
> "configuration".

The following lines work:

  %center% %width=200px newwin% [[ http://site | Path:image.gif ]] %%
  %center newwin% %width=200px% [[ http://site | Path:image.gif ]] %%

  %p center newwin% %img width=200px% ... %%
  %block center newwin% %img width=200px% ... %%
WikiStyles stop working when a new wikistyle appears, unless they apply to 
different types of objects. In your case, %center% applies to the paragraph 
(or block), the two others apply inline to the things before the closing %% or 
the opening different %style%. Luckily, you can combine many definitions in a 
single WikiStyle like %width=200px newwin% ... %% in the first example, which 
is probably what you need. The other examples show that you can apply the 
"newwin" WikiStyle to the paragraph, ie. to all links in the paragraph, and 
apply the "width" style just to the image.


More information about the pmwiki-users mailing list