Forums / Developer / Object name pattern

Object name pattern

Author Message

Femar Group

Monday 04 April 2005 1:45:55 am

When I'm creating a new content class, in the field "Object name pattern" i use for example <name>.
Now I want to use only a part of the string contained in <name>, something like shorten(30).

Please help me!!!

Ekkehard Dörre

Monday 04 April 2005 2:37:26 am

Hi Femar,

via template:
http://www.ez.no/ez_publish/documentation/reference/template_operators/strings/shorten
Greetings, ekke

http://www.coolscreen.de - Over 40 years of certified eZ Publish know-how: http://www.cjw-network.com
CJW Newsletter: http://projects.ez.no/cjw_newsletter - http://cjw-network.com/en/ez-publ...w-newsletter-multi-channel-marketing

Femar Group

Monday 04 April 2005 3:12:05 am

Thanks, but i want to use it in the admin interface when i'm creating a new class (in the field "Object name pattern").

Ekkehard Dörre

Monday 04 April 2005 4:11:36 am

setup->classes->

In some datatypes you can use:

Max string length:

30 characters

so anybody can insert only 30 characters.

Greetings, ekke

http://www.coolscreen.de - Over 40 years of certified eZ Publish know-how: http://www.cjw-network.com
CJW Newsletter: http://projects.ez.no/cjw_newsletter - http://cjw-network.com/en/ez-publ...w-newsletter-multi-channel-marketing

Femar Group

Monday 04 April 2005 4:43:32 am

Sigh...
Ekke you're right, but the field <b>Object name pattern</b> is not a datatype defined by me, so I can't change the "string length".
When I add a new class, there are 4 default parameters for the new class:
1) Name
2) Identifier
<b>3) Object name pattern</b>
4) Container (checkbox)

Paul Forsyth

Monday 04 April 2005 4:49:19 am

There isnt a lot you can do with object names. To change this you need to modify the php class file :(

Look at this bug from a while back:

http://ez.no/community/bugs/object_name_pattern_should_allow_more_options

paul

Femar Group

Monday 04 April 2005 6:06:23 am

Great!!!
It's exactly what i need.
Thanks a lot!