[Pmwiki-users] Re: question about PmWiki.IfGroup
Knut Alboldt
pmwiki
Wed Oct 27 14:12:59 CDT 2004
At 05:55 27.10.2004, Shi wrote:
>Hi Knut,
>
>Thanks for the very nice IfGroup module!
it's my pleasure :-)
>I tried your suggestion to "use an [[include:Groupname.SideBar]] within the
>Main.SideBar and within the Groupname.SideBar I place the =ifgroup-markups."
>
>However, that gives me only that one group's listing when I'm in the group
>rather than the entire listing of all the other groups. I figured out a
>workaround for this by using a differently named page for this, e.g. SubMenu.
>
>Also, I tried the following:
>=ifgroup Shi [[include:Shi/Index]]
It really was my first intention to use it like that, but that does not
work, cause of the way include is processed by pmwiki v1, so the contents
is inserted as one line. This results in the way pmwiki v1 resolves the
includes and can't be changed without implementing a second
include-function. (the textlines are read into an array splitted by
superscript-2, if [[include ...]] is processed and replaced with the text
from the included page. The text will be inserted within the array-entry
containing the [[include]] with the linefeeds or superscript-2 kept -
normally they should be expanded to additional array-entries, but then you
have to rewrite this wiki-function)
>however that seemed to show all but the first line of the Shi.Index page when
>not displaying the Shi group. I suspect the =ifgroup is somehow only applying
>to the first line of the included file. Do you have any workarounds for
>this?
>The advantage of being able to do that would be that I could update my wiki
>trail page and instantly have the submenu also be updated.
Yes I understand what you want. Another possibility would be resolving all
includes before processing a wiki-trail-page, so all subsequent
list-entries would be processed too. But that means to change the
trail-implementation and add the include-function here (tried this first, too).
I decided to go another way and can recommend:
migrate to version 2 ! it's spendid. the ifgroup will not be neccessary any
more and replaced by the much better (:If condition:) markup - you can
define any condition by yourself ! The version is quite stable, there are
some bugs still open (see pmwiki's PITS) but you can easily setup a
temporary v2 wiki with the old one in the "background" to test the whole
thing. And a "automatic" conversion-script is also included. You should
give it a try !
If you need some help for setting up the test-wiki just mail. Or join the
pmwiki-user maillist, I got a lot of info from the folks there.
Knut
More information about the pmwiki-users
mailing list