Share » Forums » Developer » How to convert the type 'string' or...

How to convert the type 'string' or 'integer' in an array ?

How to convert the type 'string' or 'integer' in an array ?

Tuesday 12 December 2006 12:24:24 am - 2 replies

Modified on Tuesday 12 December 2006 12:26:58 am by Anthony M.

Author Message

Xavier Dutoit

Tuesday 12 December 2006 10:31:08 am

Hi,

Not sure I got your need. What's the meaning of casting a string (or int) to an object ?

How would your cast "toto" to an object, with a class, a list of data_map and all that jazz ?

X+

http://www.sydesy.com

kracker (the)

The Doctor

Tuesday 12 December 2006 11:06:45 am

I think I hear a familiar if not all too common case when a user is looking to understand quickly how to work within eZ publish.

<b>Stage #1 - Understanding eZ publish template language</b>

To understand that while eZ publish is very flexible, you often must learn how to work within the provided constructs in eZ publish.

It would seem you are learning to use the 'attribute()' operator to display the current node/content object's attributes.

You can 'select' a content object's information. To my knowledge there is not a way to alter the content object's information using template language directly, this is a task best left to php.

Strings can be turned into Arrays in template language in the following way.

{def $folder_id=array(1,2,3,4,5)}

//kracker

<b>References</b>
<i>
http://ez.no/doc/ez_publish/technical_manual/3_8/templates/information_extraction/outputting_node_and_object_data
http://ez.no/doc/ez_publish/technical_manual/3_6/reference/objects/ezcontentobject
http://ez.no/doc/ez_publish/technical_manual/3_8/templates/the_template_language/variable_types
http://ez.no/doc/ez_publish/technical_manual/3_6/reference/template_operators/arrays/array
http://ez.no/doc/ez_publish/technical_manual/3_6/reference/template_operators/arrays
</i>

Member since: 2001.07.13 || http://ezpedia.se7enx.com/

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu