new section / new template

Author Message

John Mina

Tuesday 16 March 2004 4:21:10 am

HI
Now i belive that the sections were created so that when i create folder and i want to view this fodler in a special way. i create a section that will be related to the template that i wil lcreate to view that folder.

Knowing that i didn't create a new class for this.

IS that correct?

so if yes,
I created a fodler "New Fodler" then i put some images inside, and i need to create a template for that folder that will view the pix inside the folder in a special way. so i can't use the folder.tpl as it is for showing all the folders.
Any idea about how this could be done?

Alex Jones

Tuesday 16 March 2004 6:46:18 am

You are correct in your understanding of sections. Though is you only want to override one folder, you don't have to create a new section. You could choose to override the template for that one folder with a node override instead. For example, either of the two following examples would allow you to override the folder view when placed in your <i>override.ini.append</i>. Note, you will need to change <i>your_special_folder</i> and the node/section ID to match your set up.

<b>Example 1</b>
[your_special_folder]
Source=node/view/full.tpl
MatchFile=<i>your_special_template</i>.tpl
Subdir=templates
Match[node]=<i>23</i>

<b>Example 2</b>
[your_special_folder]
Source=node/view/full.tpl
MatchFile=<i>your_special_template</i>.tpl
Subdir=templates
Match[section]=<i>5</i>

Documentation: http://ez.no/ez_publish/documentation/customization/custom_design/override_templates

Alex

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

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

John Mina

Thursday 18 March 2004 5:31:06 am

Thanks a Lot Alex
i found that the problem was the order of writting the sections in the ini file
tha tcould be also adjusted in the priority box from thes etup interface
THanks Again

Alex Jones

Thursday 18 March 2004 7:21:24 am

Glad to hear you solved it. The order of overrides seems to cause a lot of problems for people. I know it has gotten me in trouble a couple of times. ;)

Alex

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

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

poon sg

Friday 05 November 2004 12:26:17 am

Hi,
Sorry, I clicked the topic.
yes , I also don't want to create a section just in order to override a folder, but I met another problem: if I want to let the user to remove or edit self created files,the override template can't works.

1)I let the user have the authority to create,edit or remove
2)Add the corresponng program in specifal_file_line.tpl
3)Modify the override.ini.append file

[specifial_file_folder]
Source=node/view/full.tpl
MatchFile=specifal_file_folder.tpl
Subdir=templates
Match[node]=202

[specifial_file_line]
Source=node/view/line.tpl
MatchFile=specifal_file_line.tpl
Subdir=templates
Match[node]=202

The"the_specifial_file_folder" works fine, but the "specifial_file_line" can't work, still use default file_line.tpl. but if I created a section for the specifial folder, and modified the override.ini.append file as below,is works fine.

[specifial_file_line]
Source=node/view/line.tpl
MatchFile=specifal_file_line.tpl
Subdir=templates
Match[section]=18
Match[class]=12

Is it possible if I don't create a section to let the specifial_file_line.tpl works fine for the specifial folder?

any hint or code will be high appreciate.

regards!
SGpoon

 

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 22:29:19
Script start
Timing: Jan 18 2025 22:29:19
Module start 'layout'
Timing: Jan 18 2025 22:29:19
Module start 'content'
Timing: Jan 18 2025 22:29:21
Module end 'content'
Timing: Jan 18 2025 22:29:21
Script end

Main resources:

Total runtime1.0986 sec
Peak memory usage4,096.0000 KB
Database Queries65

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0071 587.9141152.6250
Module start 'layout' 0.00710.0035 740.539139.4453
Module start 'content' 0.01071.0867 779.9844601.0313
Module end 'content' 1.09740.0012 1,381.015616.1641
Script end 1.0986  1,397.1797 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00350.3186160.0002
Check MTime0.00130.1156160.0001
Mysql Total
Database connection0.00140.124010.0014
Mysqli_queries1.034894.1888650.0159
Looping result0.00070.0632630.0000
Template Total1.061296.620.5306
Template load0.00210.190020.0010
Template processing1.059196.404320.5296
Template load and register function0.00010.009610.0001
states
state_id_array0.00100.087310.0010
state_identifier_array0.00130.116120.0006
Override
Cache load0.00190.1685660.0000
Sytem overhead
Fetch class attribute can translate value0.00050.044330.0002
Fetch class attribute name0.00100.095460.0002
XML
Image XML parsing0.00080.072630.0003
class_abstraction
Instantiating content class attribute0.00000.001570.0000
General
dbfile0.00070.0654160.0000
String conversion0.00000.001040.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
5content/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
12content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 31
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs