Share » Forums » General » Selecting multiple objects at once...

Selecting multiple objects at once for object relations

Selecting multiple objects at once for object relations

Saturday 11 March 2006 6:27:02 am - 2 replies

Author Message

Marc Boon

Saturday 11 March 2006 3:22:32 pm

I found out how to do this by studying the comments in the ini files in /settings.
Two ini files control browsing and object selection behaviour:
browse.ini and content.ini

In browse.ini actions are defined for various browsing tasks.
In content.ini these browsing actions can be tied to class attributes. So you can control the browsing behaviour for every class attribute individually.

To customise the browsing behaviour for my admin site, I created browse.ini.append.php and content.ini.append.php files in /settings/siteaccess/admin.

In browse.ini.append.php, I defined additional browsing actions, like this one for selecting multiple images from the Images folder, using checkboxes:

[AddRelatedImages]
StartNode=images
SelectionType=multiple
ReturnType=ObjectID

In the same browse.ini.append.php file, you can specify aliases for folder nodes, like in the above example for the Images folder:

AliasList[]
AliasList[images]=51

In content.ini.append.php, you can then specify which class attributes use which browsing method. I specified the above defined browsing method for an attribute of type Object Relations, which stores relations to Image objects:

[ObjectRelationDataTypeSettings]
ClassAttributeStartNode[]
ClassAttributeStartNode[]=267;AddRelatedImages

267 is the attribute id of my attribute, and AddRelatedImages is the name of the action I defined above in browse.ini.append.php

The default browse action for a Object Relation attribute is AddRelatedObjectToDataType, which is defined in browse.ini as:

[AddRelatedObjectToDataType]
StartNode=content
SelectionType=single
ReturnType=ObjectID

Similarly, the default action for a Object Relations attribute is:

[AddRelatedObjectListToDataType]
StartNode=content
SelectionType=multiple
ReturnType=ObjectID

which is identical, except for the selection type (single vs.multiple ie radio buttons vs. checkboxes)

Luc Chase

Tuesday 13 January 2009 3:15:44 am

Anyone know of a way to add upper and/or lower limits to the number of relations which can be added to the object?
e.g. allow up to 6 relations out of a possible 20?

The Web Application Service Provider

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

36 542 Users on board!

Forums menu