Howto add content to ezFlow Blocks

Author Message

John Moritz

Tuesday 24 June 2008 11:08:26 am

I am using ezPublish 4 with ezFlow and want to integrate some custom modules into the Block System. I already made some module-extensions which I can access when I type in the Modulename into the Browsers address bar.

Now I want to know how I can add my modules into the content tree like here http://ez.no/doc/ez_publish/user_manual/4_0/daily_tasks/adding_content , because I see no other solution to put content to blocks. So far as I can see, its only possible to add content to blocks, when its available thru the content tree. I have not found a solution to add custom Modules to the content tree. My modules are, for example, like widgets (weather, who is online, newest member, etc). I want to show them on one page. At this time every custom module has its own Page.

I think the best way will be, to make my modules available thru the content Classgroups, where u can find the article, blog, forum or gallery classes. So maybe I have to convert my modules to content classes, but I have not found any information how I can do this. There are some infos I have found in the documentation http://ez.no/doc/ez_publish/technical_manual/4_0/concepts_and_basics/content_management/the_content_class , but not enough that I can understand it, and build my own content classes.

Can u guys explain in a short way, how I can make my own content class, or how I can add my custom scripts or modules to the ezFlow Blocks.

Łukasz Serwatka

Tuesday 24 June 2008 12:56:13 pm

Now I want to know how I can add my modules into the content tree like here http://ez.no/doc/ez_publish/user_manual/4_0/daily_tasks/adding_content , because I see no other solution to put content to blocks

This is one of the limitations concerning using custom modules directly in content tree. The workaround is to make a link (using link content class) which points the module view.

About eZ Flow, you can learn more from the manuals.
http://ez.no/doc/extensions/ez_flow

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

John Moritz

Wednesday 25 June 2008 8:51:10 am

Can u explain how i can do this please.
I know its very easy to link to my module. But then i dont see the content of my module, just a link. Thats not what i want to do.

For example, lets say i have written a little widget, which shows me the weather for the next three days. i made the extension which i called "myweather". Now i make a Frontpage with ezFlow Blocksystem and 2 Blocks. A big Block on the Left and a small on the right. Now i want to add the weather widget to the right block. So everybody can see how the weather is. Your solution just shows the link to the module, right?

Maybe i can use the link class, copy it, and make changes to the template, which will show my module directly and not the link?
It would be great if there is be a solution from the main developers, to include custom modules, or better widgets, to the content tree or directly to the ezFlow Block system. Another example ist the integration of widgets like last.fm or slide.com. At the moment it looks very difficult for me to do that the easy way.

I want to clarify that i can write my modules that everything fit my needs, but then i cannot use the excellent ezFlow options like timeshiftetc. I search a solution for implementing my custom things to ez with 100% integration. At the end, a editor should change things on the layout, and the editor have no idea of Webdevelopment.

Łukasz Serwatka

Wednesday 25 June 2008 2:06:12 pm

For example, lets say i have written a little widget, which shows me the weather for the next three days. i made the extension which i called "myweather". Now i make a Frontpage with ezFlow Blocksystem and 2 Blocks. A big Block on the Left and a small on the right. Now i want to add the weather widget to the right block. So everybody can see how the weather is. Your solution just shows the link to the module, right?

No, that is different approach. Link is useful when you want to hook-up to content tree. eZ Flow blocks is something totally different. If you need display in your block content from your view, you need to access it either view iframe in custom block (check manual) or call AJAX response and return the XHTML (or whatever you need) or create a template operator that returns content from your module view in template or write a GUI function (not trivial).

It would be great if there is be a solution from the main developers, to include custom modules, or better widgets, to the content tree or directly to the ezFlow Block system. Another example ist the integration of widgets like last.fm or slide.com. At the moment it looks very difficult for me to do that the easy way.

This is not difficult. eZ Flow has something called custom block which gives you freedom in creating it. It is just template where you can put everything you need. Nicolas Pastorino from French eZ Systems office had a presentation during eZ Publish Developer Day in Skien last week how to make a custom block which displays google maps for example. There was no PHP codding required. (I will check if his slides are available).

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

John Moritz

Friday 27 June 2008 5:55:38 am

Thanks a lot,
would be great to get more infos on custom blocks. That sounds good and is maybe exactly what i want.

A Costello

Wednesday 02 July 2008 1:56:58 pm

Did you ever find those slides? I am interested in viewing them as well.

Łukasz Serwatka

Wednesday 09 July 2008 11:08:46 pm

Hi,

Here you can download slides:
http://ez.no/content/download/238372/1614160/version/2/file/eZFlow_tutorial-developer_day.pdf

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

Gary Teh

Wednesday 24 December 2008 2:02:14 am

Hi I took the slides and attempted at setting up the google map component. I skipped a few steps in them as I had no idea what they were talking about. These are the steps from the slides I skipped

1. Quick port to PHP5
2. Some customization ( datatype's view template ) :
3. support for 'type' parameter. Controls the size and/or type or the map
4. Create templates for your block's view :
5. override block/view/view.tpl

6. Available override conditions :
7. 'type' name of the configuration block from block.iniex : GMapsItem
8. 'view'picked from the available views for a given blockex : block.ini[GMapsItem].ViewList : gmaps_1item_large

9. // override block snippet
10 .[block_gmaps_1item_tiny]Source=block/view/view.tplMatchFile=block/gmaps_1item_tiny.tplSubdir=templatesMatch[type]=GMapsItemMatch[view]=gmaps_1item_tiny

The resultant output I got was a block displayed on the front page with the text <<Block: Google Maps item>>

Might it be possible if further explanations were given for these steps. Thanks

http://name1price.com : Get a Cool website for yourself and also learn how to manage it. It is easy. Use it to get more customers for your business.

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