Share » Forums » Setup & design » Attribute fliter with integer problem

Attribute fliter with integer problem

Attribute fliter with integer problem

Saturday 11 February 2006 1:06:25 am - 14 replies

Modified on Saturday 11 February 2006 1:08:17 am by laurent le cadet

Author Message

Kristof Coomans

Saturday 11 February 2006 2:11:55 am

Did you get any debug errors or warnings?

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

laurent le cadet

Saturday 11 February 2006 2:32:00 am

Hi Kristoff,

I tryed with attribute|show :

node_id string 5737 
parent_node_id string 5644 
main_node_id string 5737 
contentobject_id string 5653 
contentobject_version string 3 
contentobject_is_published string 1 
depth string 3 
sort_field string 2 
sort_order string 0 
priority string 0 
modified_subnode string 1139593251 
path_string string '/1/2/5644/5737/' 
path_identification_string string 'locations_saisonnieres/rennes_35_appartement_t1_1_personne' 
remote_id string 'c7ffafb37ce68701e27600fe13a9357d' 
is_hidden string 0 
is_invisible string 0 
name string 'rennes (35) | Appartement T1 | 1 personne' 
data_map array Array(28) 
>auteur object[ezcontentobjectattribute] Object 
>creditrestant object[ezcontentobjectattribute] Object 
...

Any idea ?

Kristof Coomans

Saturday 11 February 2006 2:47:32 am

Hi Laurent

It's Kristof, not Kristoff ;)

Where did you place the attribute|show? And did you create a random_locations view template?

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

laurent le cadet

Sunday 12 February 2006 11:43:46 pm

Kristof,

I placed the attribute show in the loop :

<node>
{section name=News loop=$news_list max=5}
{*{node_view_gui view=random_locations content_node=$News:item}*}

HERE

{/section}
</node>

And yes I created the random_locations.tpl (node/view).

Everything works fine without the fetch based on attribute.

Here's the whole structure :

A include in a cutsom folder.tpl :

{cache-block}
{include uri="design:random_locations.tpl"}
{/cache-block}

random_locations.tpl :

{set-block scope=root variable=cache_ttl}86400{/set-block}
{let rubrique_noeud=5644
news_list=fetch('content','list',hash( parent_node_id, $rubrique_noeud,
class_filter_type, 'include',
class_filter_array, array( 'annonce' )))|shuffle}	
{section name=News loop=$news_list max=5}
{node_view_gui view=random_locations content_node=$News:item}
{/section}
{/let}

This one is ok and print "annonce" class with the custom view.
No way when I add a fecth based on attribute.

And finally, the custom view :

<div class="content-view-random-locations">
<div class="class-article">
<div class="location-short">
{section show=$node.object.data_map.photo1.content}
<div class="attribute-image">
<div class="crop">
<a href={$node.url_alias|ezurl}>{attribute_view_gui image_class=small attribute=$node.object.data_map.photo1}</a>
</div>
</div>
{/section}
{$node.object.data_map.ville.content} ({$node.object.data_map.cp1.content})<br>
{attribute_view_gui attribute=$node.object.data_map.typedebien}
{attribute_view_gui attribute=$node.object.data_map.nbpersonnes}
</div>
</div>
</div>

Ɓukasz Serwatka

Monday 13 February 2006 1:35:46 am

Hi Laurent,

You have syntax error in your code.

Use:

array( array( 'annonce/creditrestant', '>=', 0 ) )

instead of

array (array('annonce/creditrestant', '>=', 0))

Kristof asked above about warnings, it is good to enable DebugOutput on development time ;)

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

laurent le cadet

Monday 13 February 2006 2:00:18 am

Hi Lukasz,

I didn't know it was so sensitive !
Thanks.

Laurent.

Debug : It's development time but with 667 pairs of eyes watching at me at the moment ;)

Paul Forsyth

Monday 13 February 2006 3:58:33 am

Is that a bug with the parser if its affected by whitespace?

laurent le cadet

Monday 13 February 2006 5:05:29 am

it sounds like...

Paul Forsyth

Monday 13 February 2006 7:44:33 am

Do you want to do the honours?

laurent le cadet

Monday 13 February 2006 9:25:21 am

sorry, I don't understand :(

Paul Forsyth

Monday 13 February 2006 9:36:15 am

Do you want to file the bug because you discovered it :)

laurent le cadet

Monday 13 February 2006 9:55:27 am

do you think it's a bug or just a kind of typo ?
But I can report it as a bug.

Laurent

Paul Forsyth

Monday 13 February 2006 10:15:39 am

Maybe im going blind but it looks like an extra space in the wrong part of the function causes it to fail? If thats the case then it is a bug.

Paul Forsyth

Monday 13 February 2006 10:17:41 am

I think i am going blind. Its the first space thats relevant, between the array and '('. yes thats just a typo. i read too much into the other spaces.

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

36 542 Users on board!

Forums menu