Placing an article on any part of the page that you want

Author Message

Emmanuels magaya

Wednesday 13 October 2004 3:20:48 am

I have yet another question...On my homepage I wish to custom make the html - but my problem is when I want to display the dynamic content, it all comes up under the one section that I will have placed the code "{$module_result.content}" thereby listing all articles in say one table. I wish to be able to display a given article in a given section of the page or given table - according to the way I design my page.

Secondly - is it possible to custom design your own theme or page layout so that you can have a page that is exactly as you want or you can ONLY use the available themes?

Marko Žmak

Wednesday 13 October 2004 5:55:51 am

Sollution for the first problem:

First you should find the node of the article you want to display. You can do that by using the fetch function (see the Documentation Reference on EZ site). Then when you find the node, say it's $node you can use something like this:

{attribute_view_gui attribute=$article_node.object.data_map.intro}
{attribute_view_gui attribute=$article_node.object.data_map.thumbnail}
{attribute_view_gui attribute=$article_node.object.data_map.body}
{$article_node.object.data_map.title.content}

to dislplay article intro, thumbnail, body and title. You can put it enywhere in your HTML. Thumbnail is a picture you upload with the article, intro and body are XML fields so it will be displyed as formated HTML when you use attribute_view_gui (e.g. if you used bold when editing article body, it will be displayed that way).

The template code for the main page is in pagelayout.tpl. Yust edit it as any other template. And remember to clear the caches after edititng it, otherwise the changes will not be displayed.

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

Emmanuels magaya

Wednesday 13 October 2004 6:19:31 am

Thanks for that information. My homepage design is on the following link...
http://www.teenzone.co.zw/Home-Page4.jpg

and I wish to have the section written Latest News and Featured Products being dymnamic. i.e. the images and the text as well. Please tell me how I can go about this.

Marko Žmak

Wednesday 13 October 2004 8:20:17 am

I don't quite understant what you really want. Please explain in more details.

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

Emmanuels magaya

Wednesday 13 October 2004 11:41:05 pm

What I mean is...if yu look at the normal homepage for this site - it consists of a header, body and footer. However, what I want is to have my website in the form that is in the image on the link I mentioned in my prev post. The left side of the website - the side with the picture will be static BUT whats on the right will be dynamic. Secondly - the subpages will have a format different from the homepage - they will have a structure similar to that of this website(Header. body, footer). In my current website - the right side is dynamic but if I click on the links for say latest news - it displays the data on the same page and yet I wish to have it go to a page with a layout different from the homepage.

if yu are on IM we can chat my msn id is emmagaya@hotmail.com and my yahoo id is emmagaya. Just add me to your contacts so I can explain further if necessary

Alex Jones

Thursday 14 October 2004 6:32:48 am

Hi Emmanuels, have you seen the 'Building an eZ publish site tutorial? The questions you are asking are covered within it, plus there is a lot of other information that would be good for you to know. I have provided a link to it, and a couple of pages within that should help with your specific problem. In addition to Marko's suggestions, you may also want to read up on <i>fetch</i> as it is the foundation for displaying information in your templates.

<b>eZ publish Tutorial</b>: http://ez.no/ez_publish/documentation/toc/(from)/36647
<b>Creating and using a custom template:</b> http://ez.no/ez_publish/documentation/building_an_ez_publish_site/the_welcome_page/creating_and_using_a_custom_template
<b>Overview of the latest news:</b> http://ez.no/ez_publish/documentation/building_an_ez_publish_site/the_news_page/overview_of_the_latest_news
<b>Data Fetching</b> http://ez.no/ez_publish/documentation/reference/data_fetching

Alex
[ bald_technologist on the IRC channel (irc.freenode.net): #eZpublish ]

<i>When in doubt, clear the cache.</i>

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 00:16:50
Script start
Timing: Jan 19 2025 00:16:50
Module start 'layout'
Timing: Jan 19 2025 00:16:50
Module start 'content'
Timing: Jan 19 2025 00:16:51
Module end 'content'
Timing: Jan 19 2025 00:16:51
Script end

Main resources:

Total runtime0.8893 sec
Peak memory usage4,096.0000 KB
Database Queries68

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0082 588.1719152.6563
Module start 'layout' 0.00830.0036 740.828139.5078
Module start 'content' 0.01190.8759 780.3359620.4531
Module end 'content' 0.88780.0015 1,400.789116.0938
Script end 0.8893  1,416.8828 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00400.4485160.0002
Check MTime0.00130.1517160.0001
Mysql Total
Database connection0.00140.157310.0014
Mysqli_queries0.819992.1895680.0121
Looping result0.00090.0969660.0000
Template Total0.849695.520.4248
Template load0.00310.348420.0015
Template processing0.846495.177820.4232
Template load and register function0.00030.030610.0003
states
state_id_array0.00120.138210.0012
state_identifier_array0.00080.089120.0004
Override
Cache load0.00260.2925320.0001
Sytem overhead
Fetch class attribute can translate value0.00090.100230.0003
Fetch class attribute name0.00140.160780.0002
XML
Image XML parsing0.00130.149430.0004
class_abstraction
Instantiating content class attribute0.00000.002790.0000
General
dbfile0.00360.4076240.0002
String conversion0.00000.000840.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
6content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
8content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
3content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
3content/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: 22
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs