eZ Community » Forums » Install & configuration » 2 columns article layout?
expandshrink

2 columns article layout?

2 columns article layout?

Wednesday 18 December 2002 9:50:37 pm - 5 replies

First and foremost congrats to Ezteam for a revolutionary and innovative cms. Although it makes your head spin with all those new concepts, i guess that's the trade off for a very powerful cms design.

Now the question. The news section of Ez3 employs 1 column article layout that streches accross the whole middle/body section of the site. I've been reading the relevant template files like line_class_2.tpl and pagelayout_section_3.tpl to understand how things work. I understand that the template variable {$module_result.content} from the section template gets its presentation from the content object template itself like the line_class and full_class in the node folder.

What i don't understand is how can you make a content object like an article to be displayed in 2 columns.

And lastly how can you implement "a latest forum msgs" in the frontpage section of your site like the ones in the frontpage of sitepoint.com

Thanks, your answer will be very valuable as i'm now creating my site for ez3.

Thursday 19 December 2002 8:03:16 am

If you find out, how to make this work, let us know.
I have same problem.

Thursday 19 December 2002 10:20:36 am

> Now the question. The news section of Ez3 employs 1 column
> article layout that streches accross the whole middle/body
> section of the site. I've been reading the relevant template
> files like line_class_2.tpl and pagelayout_section_3.tpl to
> understand how things work. I understand that the template
> variable {$module_result.content} from the section template
> gets its presentation from the content object template
> itself like the line_class and full_class in the node
> folder.
>
> What i don't understand is how can you make a content object
> like an article to be displayed in 2 columns.
I would create two text fields in the article ( left and right column ) which is used to input the text for the two columns. Then you alter the view template for the article to show these two fields side by side.

> And lastly how can you implement "a latest forum msgs" in
> the frontpage section of your site like the ones in the
> frontpage of sitepoint.com
Check the file line_class_6.tpl which comes with the demo design. There you see some code like:
{section name=Message loop=fetch(content,tree,hash(parent_node_id,$node.node_id,limit,5,sort_by,array(published,false()),class_filter_type,include,class_filter_array,array(8)))}
<li>{node_view_gui view=line content_node=$Message:item}</li>
{/section}

This lists the latest forum messages from the current forum. You can just alter this code a bit and you can use it in any template.

--bård

Thursday 19 December 2002 10:30:46 am

What in case, you have frontpage with news and you want to show in two or even more columns news for different sections/directories ( for example, sports, economic).

How can you solve then this ?

Thursday 19 December 2002 10:50:40 am

> What in case, you have frontpage with news and you want to
> show in two or even more columns news for different
> sections/directories ( for example, sports, economic).
>
> How can you solve then this ?
In the template, much the same way as the forum frontpage in the demo setup. Basically you use the fetch function in eZ publish to fetch articles, forum messages etc and display them in a table with the desired number of columns. You can use the function I showed in the previous post for this as well.

--bård

Thursday 19 December 2002 8:19:11 pm

Hi BF and all the other guys happy.gif Emoticon Though i don't have the time yet to try your suggestions. Nevertheless i'm glad you all take notice of my post. Thanks to all.

> > Now the question. The news section of Ez3 employs 1
> column
> > article layout that streches accross the whole
> middle/body
> > section of the site. I've been reading the relevant
> template
> > files like line_class_2.tpl and pagelayout_section_3.tpl
> to
> > understand how things work. I understand that the
> template
> > variable {$module_result.content} from the section
> template
> > gets its presentation from the content object template
> > itself like the line_class and full_class in the node
> > folder.
> >
> > What i don't understand is how can you make a content
> object
> > like an article to be displayed in 2 columns.
> I would create two text fields in the article ( left and
> right column ) which is used to input the text for the two
> columns. Then you alter the view template for the article to
> show these two fields side by side.
>
> > And lastly how can you implement "a latest forum msgs"
> in
> > the frontpage section of your site like the ones in the
> > frontpage of sitepoint.com
> Check the file line_class_6.tpl which comes with the demo
> design. There you see some code like:
> {section name=Message
> loop=fetch(content,tree,hash(parent_node_id,$node.node_id,limit,5,sort_by,array(published,false()),class_filter_type,include,class_filter_array,array(8)))}
> <li>{node_view_gui view=line
> content_node=$Message:item}</li>
> {/section}
>
> This lists the latest forum messages from the current forum.
> You can just alter this code a bit and you can use it in any
> template.
>
> --bård

expandshrink

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

36 542 Users on board!

Forums menu

Proudly Developed with from