[pmwiki-users] if directive and pagelist and LocalTemplate
Kathryn Andersen
kat_lists at katspace.homelinux.org
Thu May 3 06:39:53 CDT 2007
On Thu, May 03, 2007 at 10:08:30AM +0200, SMETS Stephane BKS-IT wrote:
> [[#favorites]]
> (:if name *EMSQUERY* :)
> (:table:)
> (:cellnr:)[[{=$FullName}?action=graphdel|skin:croix.jpg"delete from your profile"]]
> (:cell:)[[{=$Group}/{=$DefaultEMSQueryGroupName}-{=$DefaultEMSQueryGroupName}?action=PTV&page={=$FullName}?|EMSQuerY ]]
> (:tableend:)
[snip]
> The if directive returns always false excepted when the page contains emsquery.
>
> So my conclusion is : in the case of a pagelist, the "name" test uses the current page name and not a pagename coming from the pagelist, by opposite of the wiki variables like $FullName
That is the correct behaviour.
(:if name ...:) always tests the name of the current page, whether the
condition is inside a pagelist template or not.
I can't remember whether there is an if condition that does matching (as
distinct from equality). If you could make do with equality, you could
have something like:
(:if equals "{=$Name}" "EMSQUERY":)
Kathryn Andersen
--
_--_|\ | Kathryn Andersen <http://www.katspace.com>
/ \ |
\_.--.*/ | GenFicCrit mailing list <http://www.katspace.com/gen_fic_crit/>
v |
------------| Melbourne -> Victoria -> Australia -> Southern Hemisphere
Maranatha! | -> Earth -> Sol -> Milky Way Galaxy -> Universe
More information about the pmwiki-users
mailing list