ibexa

Path

ez publish / technical manual / 4.5 / features / notifications / adding a "keep me updated"...


Caution: This documentation is for eZ Publish legacy, from version 3.x to 5.x.

  • Adding a "Keep me updated" button

    A user can subscribe for subtree notifications for the page that is being viewed by making use of a "Keep me updated" button. Many of the default templates do not contain this button. The only exception is made for the forum pages where the button code is included into the following templates:

    • design/your_siteaccess/override/templates/full/forum.tpl
    • design/your_siteaccess/override/templates/full/forum_topic.tpl

    Returning to the previous example, if you have a set of articles located under a folder called "Business", your users will not be able to subscribe for subtree notifications for this folder as long as there is no "Keep me updated" button there. Please note that the user must be logged in to make use of this feature.

    You can easily add the "Keep me updated" button by inserting the following code into the override templates. For example, you can add this code to the "design/your_siteaccess/override/templates/full/folder.tpl" template:

    <form method="post" action={'/content/action'|ezurl}>
    <input type="hidden" name="ContentNodeID" value="{$node.node_id}" />
    <input type="submit" name="ActionAddToNotification" value="Keep me updated" />
    </form>
    

    After clearing the caches, the "Keep me updated" button will appear every time a user is viewing a folder. The same changes can be easily done for your articles and other content objects.

    Please note that some of the default templates may already contain a "/content/action" form. In this case, make sure that all the variables listed in the above code fragment are present inside this form in the template. You can also have several forms posting data to"/content/action".

    If you wish to have the button present in the page layout then you'll have to do it a bit differently. The reason for this is that the $node variable is not present in the page layout.

    {* Check if we have a node... *}
     {if $module_result.node_id}
     
     <form method="post" action={'/content/action'|ezurl}>
     
     <input type="hidden" name="ContentNodeID" value="{$module_result.node_id}" />
     <input type="submit" name="ActionAddToNotification" value="Keep me updated" />
     
     </form>
     
     {/if}
    

    Svitlana Shatokhina (14/09/2010 11:50 am)

    Geir Arne Waaler (29/09/2010 6:46 am)

    Balazs Halasy, Geir Arne Waaler


    Comments

    There are no comments.