Path

ez projects / advanced_content


Advanced Content

UNIX name Owner Status Version Compatible with
advanced_content Kristof Coomans planning 1.0.1 3.6

The advancedcontent extension provides a new window with attribute
relations in the full view in the admin interface. It temporarely
solves some problems described in the thread .

Advancedcontent extension
Copyright (C) 2005 SCK-CEN (Belgian Nuclear Research Centre)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published
by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
Features
****************************
- adds a new window with attribute relations to the full view of the
admin interface
- fetch functions to get related objects, related objects count,
reverse related objects and reverse related objects count.
These functions differ from those in the content module. Some of them are
used in the included templates.
Installation instructions
****************************
1. Enable the extension (in site.ini or by using the admin
interface)
2. Append "admin_navigation_attribute_relations=0" to
CachedViewPreferences[full] under the group [ContentSettings] in
site.ini. This ensures the content cache for the full view will take
into account the user preference used by our templates.
3. Clear the template override cache and the content cache.
4. Throw away all compiled templates for windows.tpl,
window_controls.tpl and full.tpl, or clear the complete template
cache.
Technical explanation
***************************
The templates are almost the same as in the default admin design. They
only have extra code for the window called "Attribute relations". The
items in this window are fetched with the fetch functions of the
advancedcontent module, because currently there are no fetch
functions in eZ publish to get all attribute relations (and reverse
attribute relations) for a specific object. There are only fetch
functions to return relations made by a specific object attribute.

The fetch functions
***************************
You can use the advancedcontent module to fetch related and reverse
related objects. It provides 4 fetch functions:
reverse_related_objects
--------------------------
Usage:
Parameters:
- contentobject_id: The ID number of the target object
- attributes_type: 'include' if you want to fetch related objects for
the attributes listed in the parameter "attributes", 'exclude' if you
want to exclude the attributes listed in the parameter "attributes".
The default is include.
- attributes: an array of class attribute ID's or class attribute
identifiers in the form of 'class_name/attribute_identifier'
Examples:
1. If you want to fetch all reverse related objects that weren't made
by an attribute, you can use the following code:
2. If you want to fetch all reverse related objects that were made by
an attribute, you can use the following code:
reverse_related_objects_count
--------------------------------
Usage:
related_objects
-------------------
Usage:
Parameters:
- contentobject_id: The ID number of the source object
- version: version of the source object
related_objects_count
------------------------
Usage:

 

Screenshot

This project has no reviews yet. Be the first one to review it!

No forum messages yet.