Monday 05 October 2009 9:58:16 am
First at all, hello everyone, and please forgive my bad english. I've been working alone with ezpublish for more than a month, but i still have problems anderstanding basics. I have a few questions, and I hope you can answer me. I use ezpublish 4.2 with plain_site installation (4.1.3 before) I know modx very well, if it can help. 1) What is the difference of fonctionning between modules, sitesaccess and views with urls? 2) How to use other modules than content ? Using urls like http://www.mysite.com/index.php/module_name/view_name What are exactly views ? I have a "view" view in content module, but also a "search", "action" or "tipafriend" views. 3) How to make work this better, in the attented way : Let's say I have http://www.mysite.com/path-to-dev-site/index.php I can access a content page (ie. node ID 42), using the following urls (they work, fine)
http://www.mysite.com/path-to-dev-site/index.php/siteaccessname/Section_object_name/Content_object_name
Or
http://www.mysite.com/path-to-dev-site/index.php/content/view/full/42/ (with fallback to default siteaccess)
Or http://www.mysite.com/path-to-dev-site/index.php/siteaccessname/content/view/full/42/ So, If i anderstand well, url 1&2 are "pointing" to url 3 , right ? I currently work the following way. In my design/siteaccess/templares/pagelayout.tpl, I use the following (sample) code :
{include uri='design:chunks/header.tpl'}
{if $module_result.content_info.class_identifier|eq('customsection')}
{include uri='design/siteaccessname/templates/customsection.tpl'}
{elseif $module_result.content_info.class_identifier|eq('customcontent')}
{include uri='design/siteaccessname/templates/customcontent.tpl'}
{else}
{include uri='design/siteaccessname/templates/404.tpl'}
{/if}
{include uri='design:chunks/footer.tpl'}
* btw, using {include uri='design:filename.tpl'} doesn't work everytime. Anyone know what I'm doing wrong ? * And in "customsection.tpl" and "customcontent.tpl", I basicaly do :
{def $node=fetch(content,node,hash(node_id,$module_result.node_id))}
<h1>Title of the node : {attribute_view_gui attribute=$node.data_map.title}</h1>
<p>Text of the node : {$node.data_map.body.data_text}</p>
This is basically "php", with ezpublish template language. 4) I can't override templates. Let's say i want to override /content/search.tpl In the administration, I go to design => models. I click on the file link, I select the right siteaccess and create a new override (empty extention). I check the override.ini.append.php in my siteaccess:
[search]
Source=content/search.tpl
MatchFile=search.tpl
Subdir=templates
Then I go to
http://www.mysite.com/path-to-dev-site/index.php/content/search
or http://www.mysite.com/path-to-dev-site/index.php/siteaccessname/content/search But with debug, I still have
eZTemplate: Loading template "content/search.tpl" with resource "design"
Notice: Oct 05 2009 16:40:11
design/base/templates/content/search.tpl, utf-8
Finally, I want to have a poll and subscription on the website. I followed the tutorial : http://85.19.74.108/developer/articles/how_to_create_ez_publish_forms/
But when I try to preview the contentnode having the subscription content class, http://www.mysite.com/path-to-dev-site/index.php/content/view/full/42/ The final template loaded is aways design/standard/templates/content/collectedinfo_validation.tpl I know there are lot's of thing asked here, but I'ld really enjoy have a few more information. Thank you - Stol
|