Violetta Baeva wrote:

> Does anyone know how to extend existing Magnolia classes (and which of them) 
> to be able to preprocess static fields and replace special tokens with their 
> values?
> 
> For example if we have a value "Price from {item.123.price}" then a token 
> {item.123.price} will be recognised, a corresponding method will be called 
> (getItemPrice(123)) and the token will be replaced with its value
> 
> "Price from £15" will be display to the final user on the website.

To me it sounds like a more Magnolia-style approach would be to have a dialog 
for the page/component which lets you select the item and then the 
FreeMarker/JSP template could call the model class of the page/component to get 
the price. That way you can just use the templating mechanism that's already 
available.

Nils.

----------------------------------------------------------------
For list details, see http://www.magnolia-cms.com/community/mailing-lists.html
Alternatively, use our forums: http://forum.magnolia-cms.com/
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------

Reply via email to