Forums / Install & configuration / In-Content Global Variables. Possible?

In-Content Global Variables. Possible?

Author Message

Russell Michell

Monday 05 May 2008 9:32:34 pm

Hi folks,

We have a requirement to show the latest volcano status (A number) in the actual text of an Article content object for example, around the website. At the moment with Plone, we can only show this data on a single page.

What we'd like to do is something like this below. Note that I'm still an Ez Newbie, so my language/concepts may not be 100% accurate :-)

Create a custom form content-object
that stores the following somewhere: Volcano name (str). Volcano status (int) this is the central 'area' where this data is added/updated.

Be able to then reference the current status of a specific volcano, by placing some reference to a variable/notation in the bodytext of an Article so that when viewing an Article, the latest status for a given volcano is displayed. (Say Volcano1 = 3)

So if I edit any article and place this:

Volcano 1 Status: $volcano_status_1

somewhere in amongst the bodytext via the WYSIWYG editor, when I saved the article, "3" would show up.

Is something like this possible with Ez?

Many thanks for your time.

Russell Michell, Wellington, New Zealand.
We're building! http://www.theruss.com/blog/
I'm on Twitter: http://twitter.com/therussdotcom

Believe nothing, consider everything.

André R.

Tuesday 06 May 2008 12:01:40 am

Yes, but you can't insert template variables directly, but you can create a custom tag (see doc online and content.ini in you settings folder) that generates this data for you and can be placed anywhere in the XML block content.

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom