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

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

Main resources:

Total runtime1.2937 sec
Peak memory usage4,096.0000 KB
Database Queries54

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0048 589.0547152.6250
Module start 'layout' 0.00480.0032 741.679739.4453
Module start 'content' 0.00811.2841 781.1250541.5859
Module end 'content' 1.29220.0014 1,322.710912.1563
Script end 1.2936  1,334.8672 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00330.2555160.0002
Check MTime0.00130.0981160.0001
Mysql Total
Database connection0.00070.054010.0007
Mysqli_queries1.238795.7521540.0229
Looping result0.00050.0419520.0000
Template Total1.264597.720.6323
Template load0.00200.155620.0010
Template processing1.262597.590120.6313
Template load and register function0.00030.020210.0003
states
state_id_array0.00100.074210.0010
state_identifier_array0.00080.061320.0004
Override
Cache load0.00180.1362380.0000
Sytem overhead
Fetch class attribute can translate value0.00190.144120.0009
Fetch class attribute name0.00130.096830.0004
XML
Image XML parsing0.00070.054220.0004
class_abstraction
Instantiating content class attribute0.00000.000630.0000
General
dbfile0.00080.0649160.0001
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/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
12content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
8content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
5content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1content/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: 30
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs