[pmwiki-users] links with alternate attachment
noskule
noskule at gmx.net
Wed Sep 3 11:38:10 CDT 2008
Peter Bowers schrieb:
> I made a link like this:
>
> [[Group.Page?template=Group.AltTemplate|mylink]]
>
> in hopes that when that page was initially created it would use the
> AltTemplate page as the template but then afterwards the same link
> would be used to view the page. It seems to ignore the ?template=X.
>
> When I make the link like this:
>
> [[Group.Page?action=edit?template=Group.AltTemplate|mylink]]
>
> then it correctly creates the page using the AltTemplate, but
> obviously then subsequent access is using the edit action rather than
> the browse action.
>
> Any way around this?
>
> -Peter
>
hi peter
you could do it this way:
Create a Group BlockElements with a page SpecialLink, there you write:
(:if ! exists
{$$pagename}:)[[{$$pagename}?action=edit?template=Group.AltTemplate|mylink]]
else:)[[{$$pagename}|mylink]]
then in the page where the link should appear:
(:include BlockElement.SpecialLink pagename=Group.Name:)
the benefits of this is that you could easily change the block element
in terms of function and style
grz nos
> _______________________________________________
> 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