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.

eZ debug

Timing: Jan 19 2025 01:02:06
Script start
Timing: Jan 19 2025 01:02:06
Module start 'layout'
Timing: Jan 19 2025 01:02:06
Module start 'content'
Timing: Jan 19 2025 01:02:07
Module end 'content'
Timing: Jan 19 2025 01:02:07
Script end

Main resources:

Total runtime0.6503 sec
Peak memory usage4,096.0000 KB
Database Queries85

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0066 590.2969152.6250
Module start 'layout' 0.00660.0037 742.921939.4453
Module start 'content' 0.01030.6383 782.3672821.3047
Module end 'content' 0.64860.0016 1,603.671924.1563
Script end 0.6502  1,627.8281 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00340.5259160.0002
Check MTime0.00150.2319160.0001
Mysql Total
Database connection0.00090.144210.0009
Mysqli_queries0.565686.9712850.0067
Looping result0.00100.1561830.0000
Template Total0.614894.520.3074
Template load0.00230.352420.0011
Template processing0.612594.181720.3062
Template load and register function0.00010.020310.0001
states
state_id_array0.00190.298010.0019
state_identifier_array0.00180.273020.0009
Override
Cache load0.00200.3116530.0000
Sytem overhead
Fetch class attribute can translate value0.00070.109370.0001
Fetch class attribute name0.00120.1781140.0001
XML
Image XML parsing0.00460.708170.0007
class_abstraction
Instantiating content class attribute0.00000.0040160.0000
General
dbfile0.00420.6437410.0001
String conversion0.00000.001540.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
7content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
9content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
15content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
6content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 40
 Number of unique templates used: 7

Time used to render debug report: 0.0002 secs