[Cartoweb-dev] preselect tab / pdfexport

Alexandre Saunier alexandre.saunier at camptocamp.com
Tue Feb 20 13:57:33 EST 2007


Hello,

Lauber Christoph wrote:
> I added a news tab (like themes, search, ...) in CartoWeb where I show
> informations for the user. I added this tab on the very last position.
> At the startup of the CartoWeb project I would like to preselect this
> tab instead of the tab themes. Where can I do this? In some .ini or .js
> file or the main cartoclient.tpl file?

Oliver's solution seems to be the simplest one, I guess.

> An other question is about the exportPdf plugin. In my project logged
> users have the right to print high resolution maps. This is the only
> diference to the anonymous user. The allowedRoles in CartoWeb is set for
> the whole format. Is there a possibility to set the allowedRoles for the
> maxResolution?
> If I create 2 formats, I don't want to show the low resolution map
> (anonymous user) for the logged user. But I need a common
> general.defaultFormat for logged and anonymous users. If not, CartoWeb
> throws an error. Any idea to manage this?

You'll have indeed to define 2 formats with the same properties except 
that the permissions of both will defer, using the "loggedIn" and 
"anonymous" keywords. For instance:

formats.format_for_loggedin_users.allowedRoles = loggedIn
...
formats.format_for_anonymous_users.allowedRoles = anonymous

AS


More information about the Cartoweb-dev mailing list