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

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 31 2025 01:16:25
Script start
Timing: Jan 31 2025 01:16:25
Module start 'layout'
Timing: Jan 31 2025 01:16:25
Module start 'content'
Timing: Jan 31 2025 01:16:25
Module end 'content'
Timing: Jan 31 2025 01:16:25
Script end

Main resources:

Total runtime0.0249 sec
Peak memory usage6,144.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0052 588.1094151.1953
Module start 'layout' 0.00520.0048 739.3047220.6563
Module start 'content' 0.01000.0134 959.96091,017.8984
Module end 'content' 0.02340.0015 1,977.859449.9922
Script end 0.0249  2,027.8516 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002811.2863140.0002
Check MTime0.00124.6359140.0001
Mysql Total
Database connection0.00062.224810.0006
Mysqli_queries0.003112.558330.0010
Looping result0.00000.051610.0000
Template Total0.00114.510.0011
Template load0.00093.499610.0009
Template processing0.00020.970010.0002
Override
Cache load0.00062.497110.0006
General
dbfile0.00176.706880.0002
String conversion0.00000.039240.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs