[opencms-dev] v8news: Automatically assign to a category based on the user
Yves Glodt
yg at mind.lu
Tue May 14 12:00:31 CEST 2013
Reading CmsMacroResolver.java I see that additionalInfo does not seem to be
mapped... I abused "institution" and that works fine. Thanks
On 14 May 2013 11:26, Yves Glodt <yg at mind.lu> wrote:
> Or differently asked: Is there a complete documentation of all the
> possible %() substitutions in an xsd-file?
>
> I checked the 600 page training-material and there are only a few examples
> but nothing complete :-(
>
>
> On 14 May 2013 10:58, Yves Glodt <yg at mind.lu> wrote:
>
>> 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/8a55237a/attachment.htm>
More information about the opencms-dev
mailing list