Forums / Developer / How create module , view, templates....

How create module , view, templates....

Author Message

anne martinet

Friday 23 May 2008 1:39:59 am

Hi,

I create the directory :myadvancedsearch (a new module??)
and a template searchallsite.tpl (the default template of this module???)
in

/extension/ezwebin/design/ezwebin/templates/content/myadvancedresearch/searchallsite.tpl

And in another templates I write this link:
<a href={concat($node.url_alias,"/content/myadvancedresearch/searchallsite/")|ezurl()}>recherche partout sur le site</a>

But the access is denied

Access denied

You do not have permission to access this area.

Possible reasons for this are:

    * You are currently not logged in to the site, to get proper access create a new user or login with an existing user.
    * You misspelled some parts of your URL, try changing it.

I think it's because I don't define in a xx.ini.append.php my new module, and I don't find how ....
It's the same that a templates? (create the file + add code in override.ini.append.php) But in what file?

Thanks....

Maxime Thomas

Sunday 25 May 2008 11:25:49 pm

Hi Anne,

Some tips :

There are two kinds of links in eZ :
- system links : refering to a module, a function and sometimes parameters.
- virtual links : refering to a content, they are more human friendly and SEO friendly.

I let yyou refer to the documentation :
http://ez.no/doc/ez_publish/technical_manual/4_0/concepts_and_basics/url_translation

Your link is not right : you can only make urls to three types of links in your href :
- external links :

http://www.google.com

- content links (you know the node id or the node url alias) :

{$node.url_alias|ezurl('no')}

- system links (you know the module, the funtcion and the parameters) :

{'/content/advancedsearch'|ezurl('no')}

Second thing :
Try to read carefully the documentation, specially the concept and basics section :
http://ez.no/doc/ez_publish/technical_manual/4_0/concepts_and_basics

I guess that you want to override the common advancedsearch template, try this :
http://ez.no/doc/ez_publish/technical_manual/4_0/templates/the_template_override_system/template_override_example

Il faut faire preuve d'acharnement parfois !

Welcome to eZ comunnity !

Maxime Thomas
maxime.thomas@wascou.org | www.wascou.org | http://twitter.com/wascou

Company Blog : http://www.wascou.org/eng/Company/Blog
Technical Blog : http://share.ez.no/blogs/maxime-thomas