Saturday 25 September 2004 3:58:50 pm
Ok let's start. In database there is a lot of xml und pure textlines. Here some examples: xmltextfield:
<?xml version="1.0" encoding="UTF-8"?>
<section xmlns:image="http://ez.no/namespaces/ezpublish3/image/"
xmlns:xhtml="http://ez.no/namespaces/ezpublish3/xhtml/"
xmlns:custom="http://ez.no/namespaces/ezpublish3/custom/">
<section>
<header>Templates</header>
<paragraph>
<line>eZ publish uses templates as the fundamental unit of site design. A template is basically an extended HTML file that describes how some particular type of content should be visualized. The templates for this site are located within the following directories:</line>
<ul>
<li>"design/base/templates"</li>
<li>"design/base/override/templates"</li>
</ul>
</paragraph>
<paragraph>Please do not change/edit the contents of the default design directories, which are:</paragraph>
<paragraph>
<ul>
<li>"design/standard"</li>
<li>"design/admin"</li>
</ul>
</paragraph>
</section>
<section>
<header>Style sheets</header>
<paragraph>eZ publish makes use of CSS files (Cascading Style Sheets). These files contain information about colors, text styles, font sizes, spacing and so on; and thereby dictate the overall look/appearance of the site. The CSS files for this site are located within the "design/base/stylesheets" directory.</paragraph>
</section>
<section>
<header>Configuration</header>
<paragraph>All configuration settings are stored within .ini files. The default ini files are located inside the "settings" directory. These files must not be altered. The actual configuration files for this site are contained in override files that are located within the "settings/siteaccess/base" directory. The settings in these files override the default configuration settings. There is a GUI frontend for editing the various configuration settings. This frontend can be found in the administration interface: Setup -> Advanced -> Ini settings.</paragraph>
</section>
<section>
<header>Documentation and guidance</header>
<paragraph>The
<link id="1">eZ publish documentation</link> covers common topics related to the setup and daily use of the eZ publish content management system/framework. In addition, it also covers some advanced topics. People who are unfamiliar with eZ publish should at least read the
<link id="2">"eZ publish basics"</link> and the
<link id="3">"Day to day use"</link> chapters.</paragraph>
<paragraph>If you're unable to find an answer/solution to a specific question/problem within the documentation pages, you should make use of the official
<link id="4">eZ publish forum</link>. People who need professional help should purchase
<link id="5">support</link> or
<link id="6">consulting</link> services. It is also possible to sign up for different
<link id="7">training sessions</link>.</paragraph>
<paragraph>For more information about eZ publish and other products/services from eZ systems, please visit
<link id="8">ez.no</link>.</paragraph>
</section>
</section>
image:
<?xml version="1.0" encoding="UTF-8"?>
<ezimage serial_number="1"
is_valid="1"
filename="foggy_trees.jpg"
suffix="jpg"
basename="foggy_trees"
dirpath="var/news/storage/images/galleries/landscape/foggy_trees/256-1-eng-GB"
url="var/news/storage/images/galleries/landscape/foggy_trees/256-1-eng-GB/foggy_trees.jpg"
original_filename="packages/addons/gallery/simplefiles/6582ee1d.jpg"
mime_type="image/jpeg"
width="400"
height="300"
alternative_text="Foggy trees."
alias_key="1293033771"
timestamp="1087635481">
<original attribute_id=""
attribute_version=""
attribute_language="" />
<alias name="reference"
filename="foggy_trees_reference.jpg"
suffix="jpg"
dirpath="var/news/storage/images/galleries/landscape/foggy_trees/256-1-eng-GB"
url="var/news/storage/images/galleries/landscape/foggy_trees/256-1-eng-GB/foggy_trees_reference.jpg"
mime_type="image/jpeg"
width="400"
height="300"
alias_key="-1689502181"
timestamp="1088026612"
is_valid="1" />
<alias name="large"
filename="foggy_trees_large.jpg"
suffix="jpg"
dirpath="var/news/storage/images/galleries/landscape/foggy_trees/256-1-eng-GB"
url="var/news/storage/images/galleries/landscape/foggy_trees/256-1-eng-GB/foggy_trees_large.jpg"
mime_type="image/jpeg"
width="300"
height="225"
alias_key="-1095359119"
timestamp="1088026612"
is_valid="1" />
<alias name="gallerythumbnail"
filename="foggy_trees_gallerythumbnail.jpg"
suffix="jpg"
dirpath="var/news/storage/images/galleries/landscape/foggy_trees/256-1-eng-GB"
url="var/news/storage/images/galleries/landscape/foggy_trees/256-1-eng-GB/foggy_trees_gallerythumbnail.jpg"
mime_type="image/jpeg"
width="70"
height="53"
alias_key="-981219025"
timestamp="1091467338"
is_valid="1" />
<alias name="imagelarge"
filename="foggy_trees_imagelarge.jpg"
suffix="jpg"
dirpath="var/news/storage/images/galleries/landscape/foggy_trees/256-1-eng-GB"
url="var/news/storage/images/galleries/landscape/foggy_trees/256-1-eng-GB/foggy_trees_imagelarge.jpg"
mime_type="image/jpeg"
width="360"
height="270"
alias_key="-1729515638"
timestamp="1091467343"
is_valid="1" />
</ezimage>
author:
<?xml version="1.0" encoding="UTF-8"?>
<ezauthor>
<authors>
<author id="0"
name="Administrator User"
email="[email protected]" />
</authors>
</ezauthor>
ezmatrix:
<?xml version="1.0" encoding="UTF-8"?>
<ezmatrix>
<name></name>
<columns number="2">
<column num="0"
id="contact_type">Contact type</column>
<column num="1"
id="contact_value">Contact value</column>
</columns>
<rows number="1" />
<c>Phone</c>
<c>555 12356</c>
</ezmatrix>
or:
<?xml version="1.0" encoding="UTF-8"?>
<ezmatrix>
<name></name>
<columns number="2">
<column num="0"
id="contact_type">Contact type</column>
<column num="1"
id="contact_value">Contact value</column>
</columns>
<rows number="2" />
<c>Phone</c>
<c>555 1231236</c>
<c>Fax</c>
<c>555 2342347</c>
</ezmatrix>
ezoption:
<?xml version="1.0" encoding="UTF-8"?>
<ezoption>
<name>What do you think about Pi?</name>
<options>
<option id="0"
additional_price="">I'ts way to low</option>
<option id="1"
additional_price="">To high</option>
<option id="2"
additional_price="">Pi?</option>
<option id="3"
additional_price="">42</option>
</options>
</ezoption>
How to get them?
We take a look at /design/news/override/templates/full/article.tpl
Class article:
<i>
1. Title (textline) (id:1)
Identifizierer title
2. Short title (Textline) (id:152)
Identifizierer short_title
3. Author (Author) (id:153)
Identifizierer author 4. Intro (XML Textfield) (id:120) intro
5. Body (XML Textfield) (id:121)
Identifizierer body 6. Enable comments (Checkbox) (id:123)
enable_comments
7. Image (Objekt Relation) (id:154)
Identifizierer
image </i> Let's have a xml view on it: textline is one line. We can just add a xmltag. HTML comments are for the source look later.
<!-- title start -->
<myarticletitle>{$node.object.data_map.title.content|wash()}</myarticletitle>
<!-- title end-->
The author:
<!-- author start -->
<myarticleauthor>{$node.object.data_map.author.content.author_list.0.name|wash()}</myarticleauthor>
<myarticleauthoremail>{$node.object.data_map.author.content.author_list.0.email|wash()}</myarticleauthoremail>
<!-- author end-->
Here we need more informations:
Header, strong, list, ... The intro in xml:
<!-- xml intro text start-->
{$node.object.data_map.intro.data_text}
<!-- xml intro text end-->
for body
<!-- xml body text start-->
{$node.object.data_map.body.data_text}
<!-- xml body text end-->
<b>The whole template and have al look at the source for full xml feeling :-)</b>
{* Article - Full view for flash step 1.0*}
<div class="content-view-full">
<div class="class-article">
<h1>{$node.object.data_map.title.content|wash()}</h1>
<!-- title start -->
<myarticletitle>{$node.object.data_map.title.content|wash()}</myarticletitle>
<!-- title end-->
{section show=$node.object.data_map.author.content.is_empty|not()}
<div class="attribute-byline">
<p class="author">
{attribute_view_gui attribute=$node.object.data_map.author}
{*$node.object.data_map.author.content|attribute(show,4)*}
<!-- author start -->
<myarticleauthor>{$node.object.data_map.author.content.author_list.0.name|wash()}</myarticleauthor>
<myarticleauthoremail>{$node.object.data_map.author.content.author_list.0.email|wash()}</myarticleauthoremail>
<!-- author end-->
</p>
<p class="date">
{$node.object.published|l10n(date)}
</p>
</div>
{/section}
{section show=$node.object.data_map.image.content}
<div class="attribute-image">
{attribute_view_gui attribute=$node.object.data_map.image align=right}
{*$node.object.data_map.image|attribute(show,2)*}
</div>
{/section}
{section show=$node.object.data_map.intro.content.is_empty|not}
<div class="attribute-short">
{attribute_view_gui attribute=$node.object.data_map.intro}
{*$node.object.data_map.intro|attribute(show,1)*}
<!-- xml intro text start-->
{$node.object.data_map.intro.data_text}
<!-- xml intro text end-->
</div>
{/section}
{section show=$node.object.data_map.body.content.is_empty|not}
<div class="attribute-long">
{attribute_view_gui attribute=$node.object.data_map.body}
{*$node.object.data_map.body|attribute(show,1)*}
<!-- xml body text start-->
{$node.object.data_map.body.data_text}
<!-- xml body text end-->
</div>
{/section}
<div class="attribute-pdf">
<p>
<a href={concat("layout/set/print/content/view/full/",$node.node_id)|ezroot}>{'application/document'|mimetype_icon( small, "Printable version"|i18n( "design/standard/layout" ) )} {"Printable version"|i18n( "design/standard/layout" )}</a> |
<a href={concat('/content/pdf/',$node.node_id)|ezroot}>{'application/pdf'|mimetype_icon( small, "Download PDF"|i18n( "design/base" ) )} {"Download PDF"|i18n( "design/base" )}</a>
</p>
</div>
{* Should we allow comments? *}
{section show=is_unset( $versionview_mode )}
{section show=$node.object.data_map.enable_comments.content}
<h2>{"Comments"|i18n("design/base")}</h2>
<div class="content-view-children">
{section name=Child loop=fetch_alias( comments, hash( parent_node_id, $node.node_id ) )}
{node_view_gui view='line' content_node=$:item}
{/section}
</div>
{* Are we allowed to create new object under this node? *}
{section show=fetch( content, access,
hash( access, 'can_create',
contentobject, $node,
contentclass_id, 'comment' ) )}
<form method="post" action={"content/action"|ezroot}>
<input type="hidden" name="ClassIdentifier" value="comment" />
<input type="hidden" name="NodeID" value="{$node.node_id}" />
<input class="button new_comment" type="submit" name="NewButton" value="{'New Comment'|i18n( 'design/base' )}" />
</form>
{section-else}
<h3>{"You are not allowed to create comments."|i18n("design/base")}</h3>
{/section}
{/section}
{/section}
</div>
</div>
Greetings, ekke
http://www.coolscreen.de - Over 40 years of certified eZ Publish know-how: http://www.cjw-network.com
CJW Newsletter: http://projects.ez.no/cjw_newsletter - http://cjw-network.com/en/ez-publ...w-newsletter-multi-channel-marketing
|