Forums / Setup & design / Class and template

Class and template

Author Message

Daniele Cacace

Tuesday 08 February 2005 6:29:32 am

I have create a class on the class edit page.
I create a template ed I place the template in design/standard/override/templates/node/view/full_class_37.tpl
where 37 is class's ID, but the Template not chage :(

Help me!

Eivind Marienborg

Tuesday 08 February 2005 6:34:07 am

Have you set up the override correctly?

[class_37]
Source=node/view/full.tpl
MatchFile=node/view/full_class_37.tpl
Subdir=templates
Match[class]=37

in your override.ini.append, under settings/<siteaccess>/

Daniele Cacace

Tuesday 08 February 2005 6:47:01 am

This is correct?

design/standard/override/templates/node/view/full_class_37.tpl

because in this moment I don't see nothing

Eivind Marienborg

Tuesday 08 February 2005 6:50:53 am

You should place your override templates under your siteaccess override directory:

design/<SITEACCESS>/override/templates/node/view/full_class_37.tpl

Daniele Cacace

Tuesday 08 February 2005 7:23:19 am

I put the template in
design/standard/override/templates/node/view/
and
design/base/override/templates/node/view/
but I don't see nothing

this template is good?

<h1>{$node.titolo}</h1>

{attribute view gui attribute=$node.object.data_map.locandina}

<table>
	<tr>
		<td>
			Critico:
		</td>
		<td>
			{attribute view gui attribute=$node.object.data_map.critico}
		</td>
	</tr>
...

Eivind Marienborg

Tuesday 08 February 2005 7:41:36 am

I'm not sure if you can use your own language in the template. But anyways you have to use underscores, like this:

{attribute_view_gui attribute=$node.object.data_map.critico}

Daniele Cacace

Tuesday 08 February 2005 7:51:43 am

it does not work

I must create a template whith 2 label 1 fixed and 1 =$node.object.data_map.xxxx

can you help me?

Eivind Marienborg

Tuesday 08 February 2005 8:01:24 am

What have you got so far? Paste some template code, maybe I can see what you're trying to do :)

Daniele Cacace

Tuesday 08 February 2005 8:32:13 am

this is my template

<h1>{$node.titolo}</h1>

{attribute view gui attribute=$node.object.data_map.locandina}

<table>
	<tr>
		<td>
			Critico CIAOOOOO:
		</td>
		<td>
			{attribute_view_gui attribute=$node.object.data_map.critico}
		</td>
	</tr>
	<tr>
		<td>
			Regista:
		</td>
		<td>
			{attribute_view_gui attribute=$node.object.data_map.regista}
		</td>
	</tr>	
	<tr>
		<td>
			Presentato:
		</td>
		<td>
			{attribute_view_gui attribute=$node.object.data_map.presentato}
		</td>
	</tr>	
	<tr>
		<td>
			Associazione:
		</td>
		<td>
			{attribute_view_gui attribute=$node.object.data_map.associazione}
		</td>
	</tr>	
	<tr>
		<td>
			Produzione:
		</td>
		<td>
			{attribute_view_gui attribute=$node.object.data_map.produzione}
		</td>
	</tr>	
	<tr>
		<td>
			Distribuzione:
		</td>
		<td>
			{attribute_view_gui attribute=$node.object.data_map.distribuzione}
		</td>
	</tr>	
	<tr>
		<td>
			Uscita:
		</td>
		<td>
			{attribute_view_gui attribute=$node.object.data_map.uscita}
		</td>
	</tr>	
	<tr>
		<td>
			Durata:
		</td>
		<td>
			{attribute_view_gui attribute=$node.object.data_map.durata}
		</td>
	</tr>	
	<tr>
		<td>
			Ex Prodotti:
		</td>
		<td>
			{attribute_view_gui attribute=$node.object.data_map.exprodotti}
		</td>
	</tr>	
	<tr>
		<td>
			Trama:
		</td>
		<td>
			{attribute_view_gui attribute=$node.object.data_map.trama}
		</td>
	</tr>	
	<tr>
		<td>
			Trailer:
		</td>
		<td>
			{attribute_view_gui attribute=$node.object.data_map.Trailer}
		</td>
	</tr>	
</table>

It not function

Eivind Marienborg

Tuesday 08 February 2005 8:37:00 am

What is the output? Are you sure the template is actually used?

Insert a commentary in the template to be sure:

<!-- override/full_class_37.tpl -->

Ɓukasz Serwatka

Tuesday 08 February 2005 8:46:41 am

Hi,

Daniele I think that you should take this tutorial. Is very useful at the beginning. Take a while and read it please ;-)

http://ez.no/ez_publish/documentation/toc/(from)/36647

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

Daniele Cacace

Tuesday 08 February 2005 8:48:04 am

<!-- override/full_class_37.tpl -->

<h1></h1>

</div>
<div class="break"></div>
</div>
</div>

<div class="break"></div>
</div>

<hr class="hide" />


<div id="footer">
<div id="footer-design">

<address>
</address>

</div>
</div>

<div class="break"></div>
</div>

<!--DEBUG_REPORT-->

</body>
</html>

Eivind Marienborg

Tuesday 08 February 2005 9:10:17 am

Good Idea, check the tutorial :)

Daniele Cacace

Wednesday 09 February 2005 6:18:52 am

Perfect the tutorial is good!
But i must insert 1 icona (resize a large image) and 1 video

eZ debug

Timing: Jan 30 2025 21:20:30
Script start
Timing: Jan 30 2025 21:20:30
Module start 'content'
Timing: Jan 30 2025 21:20:30
Module end 'content'
Timing: Jan 30 2025 21:20:30
Script end

Main resources:

Total runtime0.3629 sec
Peak memory usage8,192.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0067 587.8281370.3047
Module start 'content' 0.00670.0158 958.13281,021.6094
Module end 'content' 0.02250.3404 1,979.74223,909.6641
Script end 0.3629  5,889.4063 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00461.2576200.0002
Check MTime0.00140.3755200.0001
Mysql Total
Database connection0.00070.181010.0007
Mysqli_queries0.225662.16521410.0016
Looping result0.00220.60971390.0000
Template Total0.339893.610.3398
Template load0.00100.283310.0010
Template processing0.338893.337610.3388
Override
Cache load0.00070.180510.0007
Sytem overhead
Fetch class attribute can translate value0.00200.551910.0020
XML
Image XML parsing0.00030.075210.0003
General
dbfile0.01123.0962200.0006
String conversion0.00000.001430.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
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0002 secs