Tuesday 06 June 2006 2:22:04 am
Krisof, Thanks for the fast response. Based on your suggestion, I issued this template code:
{let img_list=fetch( 'content', 'list', hash( 'parent_node_id', 94 ) )}
{$img_list|attribute(show)}
{/let}
The queries of interest are below. I find this "where" clause interesting:
WHERE path_string like '/1/43/51/67/94/%' and depth <= 5 and ezcontentclass.version=0 AND <...>
It seems that the item might be too deep. Is depth an .ini setting? I re-issued the fetch like this:
{let img_list=fetch( 'content', 'tree', hash( 'parent_node_id', 94 ), 'depth', 10 )}
{$img_list|attribute(show)}
{/let}
The resulting WHERE clause had no depth parameter:
WHERE path_string like '/1/43/51/67/94/%' and ezcontentclass.version=0 AND <...>
But I still cannot fetch a list of images from a folder in the media section. Thanks in advance for any followup advise. -Luke This is the original SQL output of interest:
Notice: eZMySQLDB::query(1 rows, 0.519 ms) query number per page:8 Jun 06 2006 08:58:14
SELECT ezcontentobject.*
FROM
ezcontentobject
WHERE
ezcontentobject.id='94'
Notice: eZMySQLDB::query(1 rows, 0.920 ms) query number per page:9 Jun 06 2006 08:58:14
SELECT ezcontentobject.*,
ezcontentobject_tree.*,
ezcontentclass.name as class_name,
ezcontentclass.identifier as class_identifier
, ezcontentobject_name.name as name, ezcontentobject_name.real_translation
FROM ezcontentobject_tree,
ezcontentobject,
ezcontentclass
, ezcontentobject_name
WHERE node_id IN ( 94 ) AND
ezcontentobject_tree.contentobject_id=ezcontentobject.id AND
ezcontentclass.version=0 AND
ezcontentclass.id = ezcontentobject.contentclass_id
AND
ezcontentobject.language_mask & 7 > 0
and ezcontentobject_tree.contentobject_id = ezcontentobject_name.contentobject_id and
ezcontentobject_tree.contentobject_version = ezcontentobject_name.content_version and
( ezcontentobject_name.language_id & ezcontentobject.language_mask > 0 AND
( ( ezcontentobject.language_mask - ( ezcontentobject.language_mask & ezcontentobject_name.language_id ) ) & 1 )
+ ( ( ( ezcontentobject.language_mask - ( ezcontentobject.language_mask & ezcontentobject_name.language_id ) ) & 4 ) >> 1 )
+ ( ( ( ezcontentobject.language_mask - ( ezcontentobject.language_mask & ezcontentobject_name.language_id ) ) & 2 ) << 1 )
<
( ezcontentobject_name.language_id & 1 )
+ ( ( ezcontentobject_name.language_id & 4 ) >> 1 )
+ ( ( ezcontentobject_name.language_id & 2 ) << 1 )
)
Notice: eZMySQLDB::query(0 rows, 1.227 ms) query number per page:9 Jun 06 2006 08:58:14
SELECT ezcontentobject.*,
ezcontentobject_tree.*,
ezcontentclass.name as class_name,
ezcontentclass.identifier as class_identifier
, ezcontentobject_name.name as name, ezcontentobject_name.real_translation
FROM
ezcontentobject_tree,
ezcontentobject,ezcontentclass
, ezcontentobject_name
WHERE
path_string like '/1/43/51/67/94/%' and depth <= 5 and
ezcontentclass.version=0 AND
node_id != 94 AND
ezcontentobject_tree.contentobject_id = ezcontentobject.id AND
ezcontentclass.id = ezcontentobject.contentclass_id AND
ezcontentobject_tree.contentobject_id = ezcontentobject_name.contentobject_id and
ezcontentobject_tree.contentobject_version = ezcontentobject_name.content_version and
( ezcontentobject_name.language_id & ezcontentobject.language_mask > 0 AND
( ( ezcontentobject.language_mask - ( ezcontentobject.language_mask & ezcontentobject_name.language_id ) ) & 1 )
+ ( ( ( ezcontentobject.language_mask - ( ezcontentobject.language_mask & ezcontentobject_name.language_id ) ) & 4 ) >> 1 )
+ ( ( ( ezcontentobject.language_mask - ( ezcontentobject.language_mask & ezcontentobject_name.language_id ) ) & 2 ) << 1 )
<
( ezcontentobject_name.language_id & 1 )
+ ( ( ezcontentobject_name.language_id & 4 ) >> 1 )
+ ( ( ezcontentobject_name.language_id & 2 ) << 1 )
)
AND ezcontentobject_tree.is_invisible = 0
AND ((ezcontentobject.section_id in (1)))
AND
ezcontentobject.language_mask & 7 > 0
ORDER BY path_string ASC
|