HowTo: Edit an add/edit template

Author Message

Shurbann Martes

Sunday 26 October 2003 7:25:16 am

Hello,

I'm accostumed right now with the editing of the content/view templates. Now I want to be able to edit the template that is used when I add or edit a new object.

For example I want to let the visitors to comment on the articles. Right now when I click on add comment I see the "default" edit template. How can I change this?

Should I use the override.ini just like i do when changing the "view" templates?
Thnx.

Shurbann

Shurbann Martes

Monday 27 October 2003 5:53:12 am

Maybe I wasn't clear enough.
I want the template engine to load instead of the default:
design/standard/templates/content/edit.tpl

this one for exapmle:
design/my_design/override/templates/my_edit.tpl

How can I accomplish this?
I Hope you can help me.

Shurbann

Paul Forsyth

Monday 27 October 2003 6:27:21 am

Yes, you should use the override ini file.

Read this documentation to see how to do this:

http://ez.no/developer/ez_publish_3/documentation/customization/custom_design/override_templates

paul

Shurbann Martes

Monday 27 October 2003 6:54:45 am

I'm doing this, but still it's not working.
This is the override.ini

[edit_comment]
Source=content/edit.tpl
MatchFile=edit_comment.tpl
Subdir=templates
Match[class]=27

I cleared everything using the clearcache.sh script

Shurbann

Paul Forsyth

Monday 27 October 2003 7:09:01 am

does:

http://<your-admin-site>/setup/templateview/content/edit.tpl

inform you that your override is in place?

also, take a look at the file permissions of your new template. the server may not be able to read it.

paul

Shurbann Martes

Monday 27 October 2003 7:50:27 am

There was no templates override assigned to content/edit.tpl. Very strange, because the chmod of the files are all 644 so it should be readable by the server.

But ok now I'm clicking on Create New. I give it the correct name, class etc.. but when I click on Create I'm not seeing no form field, where I can enter something for the newly created template.

Shurbann

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

Main resources:

Total runtime0.0183 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0051 589.0313152.6250
Module start 'layout' 0.00510.0037 741.656339.4609
Module start 'content' 0.00880.0074 781.117293.2266
Module end 'content' 0.01620.0021 874.343834.3047
Script end 0.0183  908.6484 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002513.7461140.0002
Check MTime0.00116.0323140.0001
Mysql Total
Database connection0.00073.738610.0007
Mysqli_queries0.003016.481530.0010
Looping result0.00021.029210.0002
Template Total0.00179.110.0017
Template load0.00094.741910.0009
Template processing0.00084.322110.0008
Override
Cache load0.00063.172110.0006
General
dbfile0.002714.619380.0003
String conversion0.00000.054640.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