combobox for inserting attribute+value in the current context

Oxygen general issues.
ttasovac
Posts: 87
Joined: Fri Dec 19, 2003 6:02 pm

combobox for inserting attribute+value in the current context

Post by ttasovac »

If I was creating a code template to create an element and enter the attribute value from the combobox, I would do this:

Code: Select all

<note type="footnote" resp="${ask('message', combobox, ('real_value1':'rendered_value1';'real_valueN':'rendered_valueN'), 'default')}"></note>
But what about this use case: I have an existing element

Code: Select all

<note type="footnote>blah blah</note>
and I'd like to create a code template for the Author View that will let the user insert just the attribute @resp into the current element and as its value, the selected value from the combobox. The user is not selecting the element, but their cursor is inside it.

Can I use $xpath_eval in combo with $ask to tell the code template to enter the value of the combobox into the attribute @resp of the current element?

I know I could use form controls and oxy actions for this, but in this particular case, I'd like to see if I can achieve this with a simple code template.

Many thanks in advance — and apologies for asking so many questions these days. But the customization potential of the Author View is so amazing, I'm having too much fun doing all this :)

All best,
Toma
alex_jitianu
Posts: 1014
Joined: Wed Nov 16, 2005 11:11 am

Re: combobox for inserting attribute+value in the current context

Post by alex_jitianu »

Hello,

Unfortunately, I don't see a way to achieve this using a code template. In the author page, you can create an author action based on a ChangeAttributeOperation. Afterwards, you can contribute the action in the contextual menu, toolbar or even content completion window.

Best regards,
Alex
ttasovac
Posts: 87
Joined: Fri Dec 19, 2003 6:02 pm

Re: combobox for inserting attribute+value in the current context

Post by ttasovac »

Thanks, Alex!
Post Reply