Share » Forums » Extensions » eZ Flow » [Example] How to do a dynamic...

[Example] How to do a dynamic block.useful for you!

[Example] How to do a dynamic block.useful for you!

Wednesday 09 July 2008 2:24:51 am - 8 replies

Modified on Tuesday 22 July 2008 1:23:59 am by Bin LIU

Author Message

Bin LIU

Tuesday 22 July 2008 2:33:19 am

I forgot the override.ini


[8_recipes_random]
Source=block/view/view.tpl
MatchFile=block/cooking/8_recipes_random.tpl
Subdir=templates
Match[type]=RecipesRandom
Match[view]=8_recipes_random

and my block/cooking/8_recipes_random.tpl


{def $valid_nodes = $block.valid_nodes}

<div class="contentLargeCol">
	<h3>{"Our favorites recipes :"|texttoimage('cooking_home')}</h3>
		{foreach $valid_nodes as $key => $recipe}
			<dl class="">
				<dt>{attribute_view_gui attribute=$recipe.data_map.image image_class='small_recipe' href=$recipe.url_alias|ezurl()}</dt>
				<dd><a href={$recipe.url_alias|ezurl()}>{$recipe.name}</a></dd>
			</dl>
		{/foreach}		
</div>

=== Lagardère Active ===

Fetch random
http://projects.ez.no/la_fetch_random
LA Static Cache
http://projects.ez.no/lastaticcache
LA Bookmarks (jquery)
http://projects.ez.no/labookmark
LA Calendar (jquery)
http://projects.ez.no/lacalendar

My site ez
http://lingping.info

Mircea Sabau

Thursday 24 July 2008 1:14:35 am

Another problem...

I followed your examples and seems to work ..
But when I publish a new article in source folder, the article in not diplayed... Only the initial articles are diplayed ...

I fetches articles with parameter

$subTreeParameters['SortBy'] = array( 'published', false ); // I need first the newest

Is correct?

Can you help me?

Bin LIU

Thursday 24 July 2008 5:10:13 am

it's normal

you must wait the cron pass, and the cron refresh the cache content paglayout. The new article will be show

active your cron ezflow

=== Lagardère Active ===

Fetch random
http://projects.ez.no/la_fetch_random
LA Static Cache
http://projects.ez.no/lastaticcache
LA Bookmarks (jquery)
http://projects.ez.no/labookmark
LA Calendar (jquery)
http://projects.ez.no/lacalendar

My site ez
http://lingping.info

Quynh Nguyen

Wednesday 18 February 2009 1:20:22 am

I followed your example:

- active extension: http://projects.ez.no/la_fetch_random

- I insert information in block.ini to ezflow/settings/block.ini.append.php

- create larandomobject2s.php in folder: ezflow/classes/fetches

- create file override.ini.append.php in ezflow/settings folder

- create file 8_recipes_random.tpl in ezflow/design/ezflow/override/templates/block/cooking

- clear cache and then add one more this block, and I got error:

Fatal error: eZ Publish did not finish its request

The execution of eZ Publish was abruptly ended, the debug output is present below.

JF Ozange

Thursday 19 February 2009 1:30:51 am

Hello Quynh Nguyen
I had the same error when i tried the dynamic blocs example from the EZ Flow setup docs.
I just changed the FetchClass=ezmLatestObjects by FetchClass=eZFlowLatestObjects to make it work.
Maybe your class is the problem ?

Bin LIU

Monday 18 May 2009 8:37:13 am

it is used in project elle international, and no error

in ezflow1 and ez4.0

perhaps it need some modif in the last version

=== Lagardère Active ===

Fetch random
http://projects.ez.no/la_fetch_random
LA Static Cache
http://projects.ez.no/lastaticcache
LA Bookmarks (jquery)
http://projects.ez.no/labookmark
LA Calendar (jquery)
http://projects.ez.no/lacalendar

My site ez
http://lingping.info

A Fowler

Thursday 09 July 2009 1:19:02 pm

Is there a way to specify multiple classes to show, via the FetchFixedParameters[Class] parameter? For example (this is just a guess, and an attempt to show what I mean, though I have tested it and it doesn't work):

[DynamicMainBlock]
...
FetchFixedParameters[Class]=recipe
FetchFixedParameters[Class]=special_tip
...

Is this possible? Is there a different syntax for it?

Thank you!

A Fowler

Thursday 09 July 2009 1:42:37 pm

Never mind, I see the syntax in the Example text in the block.ini.append.php that I have. It shows this syntax:

# FetchFixedParameters[Class]=article;folder

I only got it to work, however, after both clearing the cache and removing and re-adding the dynamic block to the main layout on the front page.

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

36 542 Users on board!

Forums menu