Forums / Setup & design / Different design for top article

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

eZ debug

Timing: Jan 19 2025 03:16:06
Script start
Timing: Jan 19 2025 03:16:06
Module start 'content'
Timing: Jan 19 2025 03:16:07
Module end 'content'
Timing: Jan 19 2025 03:16:07
Script end

Main resources:

Total runtime1.6588 sec
Peak memory usage4,096.0000 KB
Database Queries222

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0055 588.9766180.8281
Module start 'content' 0.00561.4440 769.8047826.3828
Module end 'content' 1.44950.2092 1,596.1875348.4609
Script end 1.6587  1,944.6484 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00450.2734210.0002
Check MTime0.00150.0896210.0001
Mysql Total
Database connection0.00070.044610.0007
Mysqli_queries1.553293.63162220.0070
Looping result0.00250.15222200.0000
Template Total1.631298.320.8156
Template load0.00210.126020.0010
Template processing1.629198.206620.8145
Template load and register function0.00020.014510.0002
states
state_id_array0.00090.054210.0009
state_identifier_array0.00100.057420.0005
Override
Cache load0.00190.1135530.0000
Sytem overhead
Fetch class attribute can translate value0.00130.080380.0002
Fetch class attribute name0.00140.0817140.0001
XML
Image XML parsing0.00730.442080.0009
class_abstraction
Instantiating content class attribute0.00000.0017160.0000
General
dbfile0.01020.6136520.0002
String conversion0.00000.000230.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

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
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/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