[pmwiki-users] question about view concept

Bronwyn Boltwood arndis at gmail.com
Thu Aug 11 05:05:06 CDT 2005


On 8/11/05, Patrick Ogay <lists at basel-inside.ch> wrote:
> I  don't know whether I'm right about the view concept:
> 
> There are different users with different rights .
> Some actions or contents should be hidden for some users.
> Is a view linked with authorisations?

Not by default, because that's not the point.  The idea was that you
could show or hide the kind of controls (e.g. wiki action links) that
you needed for the kind of work you were doing at the time.  Some of
those controls might require authorization before you could use them,
but not before you could *see* them.  Basically, both Christian and I
were trying to think of how we could have our admin tools available
when we wanted them, but also hide them when we didn't want to see
them, without having to delete cookies or set different passwords for
different authorization levels.  Instead, we wanted to just hide the
controls we weren't using right then as normal reader/authors.

If you want to hide or show things based on authorization, you're
looking for the (:if auth foo:) conditional markup.  I tried doing
things that way, though, and it sucked, because it became difficult to
edit my edit-protected site.  There were no edit links before I put in
the edit password, which meant that I had to add an ?action=edit to
the end of the page's url, and then reload it, and then put in my
password, and then edit the page.  It made the wiki harder to use,
which you probably don't want.

What exactly are you trying to do?  It's always easier to solve a
problem when given an overview.

> A view is not a skin? (which generally the user can assign)

Yes and no.  The current view is stored in a PmWiki variable.  If the
skin has been designed to act differently when that variable matches a
certain word (such as "admin"), then the skin will show different
controls when you change the view.  You should take a look at
http://www.pmwiki.org/wiki/ViewModes/ViewModes?setskin=gemini and play
with the view links at the top left to get a better idea of what views
do.

Bronwyn




More information about the pmwiki-users mailing list