Different design for top article

Author Message

Siw Helen Thorslund

Saturday 27 November 2004 4:32:58 am

I have a site with a frontpage where I have a listing of articles separated in two colomns like this:

               <table class="article">
               <tr>
               {section var=child loop=$list_items sequence=array(bglight,bgdark)}
                   <td valign="top">
                      {node_view_gui view=line content_node=$child}&nbsp;
                   </td>
                   {delimiter modulo=2}
                   </tr>
                   <tr>
                   {/delimiter}
               {/section}
               </tr>
               </table>

I want to have a top article that fills out the two colomns, so the forntpage looks like this:

Lorem ipsum dolor sit amet, consectetuer adipiscing 
elit, sed diam nonummy nibh euismod tincidunt ut 
laoreet dolore magna aliquam erat volutpat. 

--------------------------------------------------
                        |
Lorem ipsum dolor sit   |  Lorem ipsum dolor sit
amet, consectetuer      |  amet, consectetuer
iscing elit, sed diam   |  iscing elit, sed diam
                        |
------------------------|-------------------------
                        |
Lorem ipsum dolor sit   |  Lorem ipsum dolor sit
amet, consectetuer      |  amet, consectetuer
iscing elit, sed diam   |  iscing elit, sed diam
                        |
------------------------|-------------------------
                        |
Lorem ipsum dolor sit   |  Lorem ipsum dolor sit
amet, consectetuer      |  amet, consectetuer
iscing elit, sed diam   |  iscing elit, sed diam
                        |

Anyone that knows how I can do this?

www.VZT.no ( http://www.VZT.no )
VZT References ( http://http://vzt.no/index.php/vzt_eng/referanser )
VZT Extensions ( http://vzt.no/index.php/vzt_eng/extensions )
www.MediaBase.no ( http://www.MediaBase.no )

Niklas Gunnäs

Thursday 21 April 2005 9:41:20 am

Looking for the same thing. Have you found a solution?

Eivind Marienborg

Thursday 21 April 2005 10:13:13 am

Assuming you have basic eZ knowledge, here's the short version.

First, do a fetch for the items you want on your page. Then, make a section loop with a max=1 setting, like this:

{section loop=$list_items max=1}
CODE
{/section}

Then do another section looping over the rest of the fetched array, with an offset, like this:

{section loop=$list_items offset=1}
CODE
{/section}

This hopefully gets you going the right way..

Bård Farstad

Thursday 21 April 2005 11:45:44 pm

Siw,

here is a more complete example of Eivinds:

{section max=1 var=child loop=$list_items}
  {node_view_gui view=bigline content_node=$child}
{/section}

{section offset=1 max=4 var=child loop=$list_items}
  {node_view_gui view=smallline content_node=$child}
{/section}

Notice the usage of different view modes for the node_view_gui function. Using the max and offset you can display different parts of an array/list without having to fetch it from the database more than once.

This is actually similar to the setup used on the frontpage of the ez community.

--bård

Documentation: http://ez.no/doc

Niklas Gunnäs

Friday 22 April 2005 2:38:09 am

A stupid request :-)But it never hurts to ask...

Any chance to see how your community frontpage code looks like. Not shure how to get latest articles from diffrent folder and place them as you have done.

The new community frontpage looks great the only thing I miss is a photo/image to give it a more "personal" touche.

Niklas Gunnäs

Thursday 28 April 2005 2:42:38 pm

Got it working, thanks for your help.

<table>
  {let children=fetch( content, list, hash( parent_node_id,175, sort_by, array('published',false()), limit, 5, class_filter_type, include, class_filter_array, array( 'article' ) ) )} 
  <tr>
    <td width="590" align="left" valign="top" colspan="3">
		{section name=Child loop=$children max=1  sequence=array(bglight,bgdark)}
			{node_view_gui view=fram content_node=$Child:item}
		{/section}
	</td>
   </tr>
   <tr>
    <td width="590" height="10" colspan="3">
		<img src={"/images/t3/blank.gif"|ezdesign} height="1" width="1" alt="blank" />
	</td>
  </tr>
  <tr>
    <td width="275" align="left" valign="top">
		{section name=Child loop=$children max=1 offset=1 sequence=array(bglight,bgdark)}
          		{node_view_gui view=line content_node=$Child:item} 
       	{/section}
	</td>
    <td width="40">
		<img src={"/images/t3/blank.gif"|ezdesign} height="1" width="1" alt="blank" />
	</td>
    <td width="275" align="left" valign="top">
		{section name=Child loop=$children max=1 offset=2 sequence=array(bglight,bgdark)}
         		{node_view_gui view=line content_node=$Child:item}
	     	{/section}

    </td>
  </tr>
  <tr>
    <td width="590" height="20" colspan="3">
		<img src={"/images/t3/blank.gif"|ezdesign} height="1" width="1" alt="blank" />
	</td>
  </tr>
  <tr>
    <td width="275" align="left" valign="top">
		{section name=Child loop=$children max=1  offset=3 sequence=array(bglight,bgdark)}
         	{node_view_gui view=line content_node=$Child:item}
     	{/section}
	</td>
    <td width="40">
		<img src={"/images/t3/blank.gif"|ezdesign} height="1" width="1" alt="blank" />
	</td>
    <td width="275" align="left" valign="top">
		{section name=Child loop=$children max=1  offset=4 sequence=array(bglight,bgdark)}
      		{node_view_gui view=line content_node=$Child:item}
    	{/section}
	</td>
  </tr>
{/let}
  <tr>
    <td width="590" height="10" colspan="3">
		<img src={"/images/t3/blank.gif"|ezdesign} height="1" width="1" alt="blank" />
	</td>
  </tr>
</table>

zed Zed

Wednesday 15 June 2005 3:25:35 am

Hello

I have the same problem but where do I add that code to achieve the same thing that has been done with the community page??

http://www.ez.no/community/forum/setup_design/help_front_page_design

This is my problem again here.

That could be the code I'm looking for but where to I add it so that my frontpage can look like the ez community page??

sp 1024

Thursday 30 June 2005 9:54:25 am

This may be a really obvious and basic question, but how do you edit the way the front page is displayed? I installed ezpublish but the default layout is too boring and there's no obvious way or documentation explaining how I can modify it.

Kjell Inge Sandvik

Friday 01 July 2005 7:54:47 am

sp 1024:

You might want to have a look at the tutorial http://ez.no/ez_publish/documentation/toc/(from)/36647

If you look under the section The welcome page I think you will find a solution to you problem :-)

Good luck!

Kjell Inge Sandvik
VizyTech

Sandvik Web & Data

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