[pmwiki-users] Re: View action not active

Patrick R. Michaud pmichaud at pobox.com
Thu Sep 15 10:04:16 CDT 2005

On Thu, Sep 15, 2005 at 06:32:03AM -0700, H. Fox wrote:
> > This becomes particularly
> > tricky when considering links like:
> > 
> >    [[{$Name}]]
> >    [[{$Name}?skin=light]]
> >    [[{$Name}?setview=admin]]
> > 
> Not quite, but I get your point.  It would be true if
>    [[{$Name}?setview=admin]]
> were
>    [[{$Name}?view=admin]]
> because with setview= the self-referencing ling does in fact refer to
> an identical page.
> Even with view= and skin= I don't think the inactive or missing "View"
> (browse)  link is harmful.  This is based on experience...

I'm afraid my example was incomplete, or at least the answer above
didn't seem to address the problem I'm trying to describe.  I'll try
again... :-)

The "View" link in many (most?) skins is now being generated from
Site.PageActions or a similar page.  In that page, the link generally
looks something like

    * %item class=browse accesskey=$[ak_view]%[[{$FullName} | $[View] ]]

where the part that generates the link is [[{$FullName} | $[View] ]].

Now then, if we take the position that when $action == 'browse'
this markup should not result in an actual link, what do we do 
when we later encounter...?

    [[{$FullName}?setskin=light | Change to the light skin]]

Do we claim that the existence of the query string in the markup
means that this link is never a self-reference, and therefore always
generates a standard page link?  (This is PmWiki's current approach.)  
If so, then that means that

    [[{$FullName}?action=edit | $[Edit] ]]

is never a self-reference, thus the "Edit" action will always appear
as a link even when editing the page.

> A while back I started using method #2 (check $action) in the Light
> Skin.  Currently it uses CSS (display:none;) to suppress the
> self-referring link.  IMHO it works fine so far.

Yes, this works fine for Light skin's action bar, but it might not
work well for skins that want to use a "tabbed" control panel, and
the constantly changing set of actions might confuse visitors.  
("I know I have edit permissions -- why isn't edit an option in my
control panel...?")

Anyway, I think I'm just going to leave things as-is for the time



More information about the pmwiki-users mailing list