Help with fetching custom class

Author Message

Lian Kwee Ang

Thursday 02 October 2008 2:10:06 am

Hi,

I've taken over work utilising ezpublish 3.8.4

I have a folder that stores a bunch of articles. Since I needed more fields for the articles to come, I created a custom article class.

I used the code below to fetch the articles

{def $page_limit=20}
{def $list_items=fetch('content','list',hash('parent_node_id',1947,
		'sort_by', array('published', false()), 'limit', $page_limit, 
		'class_filter_type',  'include', 'class_filter_array', array( '43' ), 'class_filter_array', array( '2' )
))}	

Array 2 refers to the article class

Array 43 refers to my customised article class.

Node 1947 is the folder I am storing my articles in.

However when listing, only the Article class ones show and not the new customised class (43) I made.

Can there be something else that is blocking my listing?

Thanks in advance for the help!

Ivo Lukac

Thursday 02 October 2008 3:15:31 am

Hello Lian,

You only need one class_filter_array like this:

{def $page_limit=20}
{def $list_items=fetch('content','list',hash('parent_node_id',1947,
                'sort_by', array('published', false()), 'limit', $page_limit, 
                'class_filter_type', 'include', 'class_filter_array', array( '43','2' ) ))}  

http://www.linkedin.com/in/ivolukac
http://www.netgen.hr/eng/blog
http://twitter.com/ilukac

Lian Kwee Ang

Thursday 02 October 2008 7:54:44 pm

Hi!

And thanks for the reply.

I've tried your method but unfortunately, the customised article class still does not get listed.

Is there somewhere that the previous coder could have specified that only Article class (2) can be fetched on that page? I've checked the override.ini.append.php, it looks fine there.

I'm really stuck on this.

Also, using

{$node.children|attribute(show,1)}

It shows all only 10 of the supposedly 13 children of the node.

In the admin panel, I see 10 article class and 3 customised article class. However, even without using the fetch command and just by using the node.children above, it seems somehow the node is not acknowledging non-article class as its children.

How do I fix that?

I will be thankful for any help!

Ivo Lukac

Friday 03 October 2008 1:47:13 am

It sound weird.
If they are not listed in $node.children then only rational explanation is that you have no privileges to see them. Either they are hidden or maybe in some non standard section or they are edited in language which is disabled in your siteaccess.
Can't remember anything else.

http://www.linkedin.com/in/ivolukac
http://www.netgen.hr/eng/blog
http://twitter.com/ilukac

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.