Forums / Setup & design / How to apply a new design to a new class (submition form) in 3.1 ?

How to apply a new design to a new class (submition form) in 3.1 ?

Author Message

Alexandre Cunha

Saturday 28 June 2003 7:18:00 am

Hi,

I follow the tutorial at http://ez.no/sdk/tutorials/view/forms to create a new class. Ok, everything fine, but this tutorial doest no full apply to the new override system on 3.1

After read the article at http://ez.no/developer/ez_publish_3/documentation/ez_publish_3/terminology_basics/the_new_template_override_system_from_31_onwards
i tried edit my settings\siteaccess\{my_site_name}\override.ini.append
and add something like:

[form] # the name of my template, ie form.tpl
Source=node/view/full.tpl # what i put where ?
MatchFile=form.tpl # the name of template at design\{my_site_name}\override\templates\
Subdir=templates
Match[class]=14 # the submition_form class number

I tried some variations without success.

What im missing ?

axel

http://AlexandreCunha.com

Paul Forsyth

Sunday 29 June 2003 1:47:56 am

Assuming you will be viewing the full version of your new class you would override the 'design/standard/templates/node/view/full.tpl' file - this is the file in Source, you just omit the bit at the start.

Matchfile the path to your file from 'design/<your design>/override/templates', so just make sure your form.tpl is in that directory.

You have subdir and Match[class] correct.

So putting it together your override will look like:

[form]
Source=node/view/full.tpl
MatchFile=form.tpl
Subdir=templates
Match[class]=14

Hope this helps

Alexandre Cunha

Sunday 29 June 2003 4:07:49 am

Hi Paul,

It is exactly what I have, but doest work ...

axel

http://AlexandreCunha.com

Paul Forsyth

Sunday 29 June 2003 8:14:35 am

Have you got debugging on?

Make sure you clear the cache with the --clear-all option since template files hang around sometimes meaning you dont see what you expect...

Are you seeing any debugging errors relating to design files not being found?

What output to you see on screen, what page are you taken to?

paul

Alexandre Cunha

Monday 30 June 2003 4:19:44 pm

I clear the cache deleting all files at var\cache.
Thanks for the sugestion about turning on the debuging option.

I turn debug on and see the warnings, Notice and errors.

And see this error:
Error: eZTemplate @ design/meusite/override/templates/file.tpl:7[0]
No such attribute for array(5): description
Choose one of following: name, receiver_name, receiver_email, subject,
feedback

Steps to get this:
At admin, i create a "Submition Form" inside a folder.
At user site, i enter the folder and see the list of itens created on this folder, includind the title of "sumbmition form".
I click the title of sumition form, to get the s.f. content and get the error with no content.

This is very confuse for me
Any help is welcome.

axel

http://AlexandreCunha.com