Author Topic

Pascal France

Monday 03 September 2007 2:47:20 am

Comment25061

I don't understand what you mean with "redirects it".

I use 4 templates

templates/full/aritcle/articles.tpl:

<form method="post" action={"content/action"|ezurl}>
<input type="hidden" name="ClassIdentifier" value="comment" />
<input type="hidden" name="NodeID" value="{$node.object.main_node.node_id}" />
<input type="hidden" name="ContentLanguageCode" value="{ezini( 'RegionalSettings', 'Locale', 'site.ini')}" />
<input class="input_button" type="submit" name="NewButton" value=" " />
</form>

templates/line/comment.tpl (displays the first level comments):

<form method="post" action={"content/action"|ezurl}>
<input type="hidden" name="ClassIdentifier" value="comment" />
<input type="hidden" name="NodeID" value="{$node.object.main_node.node_id}" />
<input type="hidden" name="ContentLanguageCode" value="{ezini( 'RegionalSettings', 'Locale', 'site.ini')}" />
<input class="input_button" type="submit" name="NewButton" value="Ajouter un commentaire" />
</form>

templates/node/view/comment_fils.tpl (displays the n+1 level comments):

<form method="post" action={"content/action"|ezurl}>
<input type="hidden" name="ClassIdentifier" value="comment" />
<input type="hidden" name="NodeID" value="{$node.object.main_node.node_id}" />
<input type="hidden" name="ContentLanguageCode" value="{ezini( 'RegionalSettings', 'Locale', 'site.ini')}" />
<input class="input_button" type="submit" name="NewButton" value="Ajouter un commentaire" />
</form>

and the templates/edit/comment.tpl template to edit/write the comments.

Say the node ID of the article is 100.
If I add this line in the form section of the templates/edit/comment.tpl:

<input type="hidden" name="RedirectURIAfterPublish" value="/content/view/full/100" />

then I'm well redirected to the article even I'm to the 10th level comment. But of course, 100 must be replace by something like {$article_node_id}.

In article.tpl I can define such a variable, but I don't know how to pass it to the edit/comment.tpl

Pascal

Ce qui embellit le désert c'est qu'il cache un puits... quelque part... (A. de Saint-Exupéry) - http://luxpopuli.fr/eZ-Publish