[pmwiki-users] Conditional Statement and Relative page references

DaveG pmwiki at solidgone.com
Mon Nov 5 17:18:30 CST 2007


As soon as I posted this, I realized that PmWiki automatically assigns 
the class "selflink" to links pointing to the current page. However, I'd 
still be interested in knowing how to use conditionals to solve the problem.

DaveG wrote:
> I'm trying to create a conditional statement to determine which page I'm 
> currently on:
>     (:if group Notes and name GardenFence:)HERE WE ARE!(:ifend:)
> 
> The problem is that I need to use the {*$Name} format since I want to 
> refer to the parent page, not the page in which the conditional markup 
> appears.
> 
> I also tried this, and numerous other combinations with no success:
>     (:if {*$Group} Notes and {*$Name} GardenFence:)HERE WE ARE!(:ifend:)
> 
> Anyone know how to do this?
> 
> In case I'm approaching this problem from the wrong direction, what I'm 
> actually trying to do is style a page navigation element if I'm on a 
> specific page. I have 3 clickable tabs; I want to add a 'selected' class 
> to a tab if we're on that page.
> 
> 
>   ~ ~ David
> 
> _______________________________________________
> pmwiki-users mailing list
> pmwiki-users at pmichaud.com
> http://www.pmichaud.com/mailman/listinfo/pmwiki-users
> 



More information about the pmwiki-users mailing list