Directory structure explained?

Author Message

Lance Leger

Thursday 01 May 2003 2:53:14 am

I'm having problems viewing custom templates that I create. Is there any
special rules you have to follow when creating a custom template? I've
tried creating a template called frontpage.tpl and setting it in the
/design/user/override/templates/content/view folder and nothing
happens when I try to load this page manually. I've started to experiment
with working templates to see if I can understand why none of the
templates I create are visible and it doesn't appear to be a roles issue.

For example, should I be able to create a file called testing.tpl with
only the word "test" inside and then put this file in the
/design/user/override/templates/content/view folder then be able
to go to http://mysite.com/index.php/user/content/view/testing
and see the word test displayed?

Any help would be greatly appreciated.

Vivienne van Velzen

Thursday 01 May 2003 4:45:26 am

Lance,

This is my view on template-usage in EZP (please feel free to correct me if I'm wrong).
It all works with IDs. For instance, to view a content-item, you'll get a url like:
http://mysite.com/index.php/user/content/view/full/11.
With this url you indicate that you want to view (obviously) the content-item with node-id 11 with the 'full' template (defined in /design/standard/templates/node/view/).

If you want to use a custom 'full' template, you have to go to /design/yoursite/override/templates/node/view, and create one.
This could be a full_node_11.tpl (used whenever a 'full' view of the content-item with node-id 11 is asked for). Or, if you want something more generic, you could redefine the 'full' template of a class, i.e. full_class_xx.tpl (in which xx is the id of the class of the content-items that you want to view in this way).

Now, you can also design your own views, which you put in /design/yoursite/templates/node/view. If you want to use these templates you have to access them from the page in which you want them to be shown, like:
{node_view_gui view=myownview content_node=$node}
where myownview.tpl is in the directory /design/yoursite/templates/node/view.

I'm not really sure myself yet about the difference between viewing content or nodes (except the fact that you use content_view_gui (and the /content/view directory) in the first case and node_view_gui (and the /node/view directory) in the second).

Hope this helps.

Vivienne

Karsten Jennissen

Thursday 01 May 2003 5:08:52 am

Hi,

are you aware of this doc?
http://ez.no/developer/ez_publish_3/documentation/ez_publish_3/terminology_basics/custom_designs_directory_structure_explained

As you are trying to create your own view mode, take a look at this:
http://ez.no/developer/ez_publish_3/documentation/ez_publish_3/terminology_basics/view_modes_of_objects

Also be sure to turn off cache / clear cache while you develop.

Karsten

Vivienne van Velzen

Thursday 01 May 2003 5:20:43 am

OK, the documents Karsten mentioned probably explain it a bit better ;).

Karsten, just one question. If you make a completely new (generic) template, would you put this one also in the override/ directory (as implied in http://ez.no/developer/ez_publish_3/documentation/ez_publish_3/howtos/how_do_i_create_my_own_content_view_mode)?
I'd think that one goes in the /design/yoursite/templates/node/view directory. I know, I know, it's probably a decision everyone has to make for themselves, but I'm a sucker for standards.
Greetz,

Vivienne

Karsten Jennissen

Thursday 01 May 2003 7:03:33 am

Hi Vivienne,

actually, I am not completely sure about the logic of the structure, as you can find generic templates in the demo site in the override folders. But you are right. :-)

Karsten

Lance Leger

Thursday 01 May 2003 5:19:50 pm

What if my template is not displaying data for a specific node? For example,
my template will be dislaying articles that are not related to each other.
The articles do not reside in the same locations. It seems like you should be
able just to display a template with the contents "test" without referencing
a particular node or ID.

Vivienne van Velzen

Friday 02 May 2003 2:32:23 am

Well, you've got me stumped on this one.
The only solution that I can see at the moment is to create a folder (i.e. 'newarticles') and add this location to the non-related articles (see the edit-screen of the articles for this). You can then use your template as default template for the 'newarticles' folder, since you now have a node-id.
This may not be what you want, but it's all I can think of now.
Greetz,

Vivienne

Marco Stipek

Thursday 15 January 2004 6:24:38 am

Links wrong! "module not found error"

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 18 2025 11:25:32
Script start
Timing: Jan 18 2025 11:25:32
Module start 'layout'
Timing: Jan 18 2025 11:25:32
Module start 'content'
Timing: Jan 18 2025 11:25:33
Module end 'content'
Timing: Jan 18 2025 11:25:33
Script end

Main resources:

Total runtime1.7433 sec
Peak memory usage4,096.0000 KB
Database Queries76

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0053 587.9141152.6250
Module start 'layout' 0.00530.0029 740.539139.4453
Module start 'content' 0.00821.7335 779.9844639.6953
Module end 'content' 1.74160.0016 1,419.679716.1641
Script end 1.7432  1,435.8438 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00320.1844160.0002
Check MTime0.00130.0735160.0001
Mysql Total
Database connection0.00070.039910.0007
Mysqli_queries1.672795.9519760.0220
Looping result0.00100.0578740.0000
Template Total1.699297.520.8496
Template load0.00230.133420.0012
Template processing1.696997.337420.8484
Template load and register function0.00010.006810.0001
states
state_id_array0.00370.210210.0037
state_identifier_array0.00230.131520.0011
Override
Cache load0.00200.1121640.0000
Sytem overhead
Fetch class attribute can translate value0.00080.048140.0002
Fetch class attribute name0.00120.067390.0001
XML
Image XML parsing0.00090.050240.0002
class_abstraction
Instantiating content class attribute0.00000.0010100.0000
General
dbfile0.00080.0441160.0000
String conversion0.00000.000640.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
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
8content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
10content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
15content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 37
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs