[opencms-dev] v8news: Automatically assign to a category based on the user
Yves Glodt
yg at mind.lu
Tue May 14 10:58:19 CEST 2013
Hi Andreas,
this is a very good idea, thanks.
I had to set minOccurs="1" first to be sure to get a Category-node in the
XML. Then I could add a default value (with the absolute path to the
category folder)
But I would like to use a property from the user, ideally from the
"Additional Info" part. But I had no luck so far. I added an entry
"defaultCategory=/sites/intranet.dkv.lu/_categories/claims/" but the
following did not get the result:
*<default element="Category"
value="%(currentuser.additionalInfo['defaultCategory'])"/>*
How is the syntax to get an entry from the additionalInfo map in the xsd ?
Best regards,
Yves
On 14 May 2013 09:58, Andreas Gily <andreas.gily at cardsys.at> wrote:
> Maybe you could define a user value as default for the category element in
> your XSD like I did with my "AuthorName" element...
>
> <xsd:annotation>
> <xsd:appinfo>
> <defaults>
> <default element="AuthorName"
> value="%(currentuser.firstname) %(currentuser.lastname)"/>
> </defaults>
> </xsd:appinfo>
> </xsd:annotation>
>
>
> cheers,
> Andreas
>
> Am 14.05.2013 um 09:34 schrieb Yves Glodt <yg at mind.lu>:
>
> > Hi,
> >
> > in a company Intranet we would like to omit manual category selection
> for blog posts (based on v8news).
> >
> > The goal would be that when user A creates a new item through the ADE,
> the category would automatically be set to DepartmentOfUserA.
> >
> > Is that possible with stock v8news ?
> >
> > (A static mapping of user->catergory would be perfectly fine)
> >
> > Best regards,
> > Yves
> > _______________________________________________
> > This mail is sent to you from the opencms-dev mailing list
> > To change your list options, or to unsubscribe from the list, please
> visit
> > http://lists.opencms.org/cgi-bin/mailman/listinfo/opencms-dev
> >
> >
> >
>
>
> _______________________________________________
> This mail is sent to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please visit
> http://lists.opencms.org/cgi-bin/mailman/listinfo/opencms-dev
>
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20130514/561a2b2a/attachment.htm>
More information about the opencms-dev
mailing list