Notifications and subscriptions


This page should only be applied if the script assisted migration asks you to pass the manual migration skin.20241113.INTRANETCARDS.PageSubscription

Version 1.28.x of the Intranet Cards charter integrates the functionalities of plugin Page Subscription:

  • 2 page and theme subscription management services
  • a subscription notification center
  • a "Follow page" button to subscribe to a page

The notification center is displayed on all pages in the header to the left of the notification links.

 

The follow page button is displayed on all pages to the right of the breadcrumb trail.

 

If you've overloaded the "common-script" template, add the call to the template loading the JS required for the notification center and page tracking.

<xsl:call-template name="head-js-subscriptions"/>

If you've overloaded the header, and in particular the "header-middle" template, add a call to the "my-subscriptions" template before the notification links.

<xsl:template name="header-middle">
        <div class="ametys-header-middle">
                    
            <div class="ametys-header-action-wrap">
                <div id="action" class="ametys-header-action">
                    
                    <ul class="ametys-header-action-nav">
                        <!-- My subscriptions -->
                        <xsl:call-template name="my-subscriptions"/>
                        <!-- Directory links -->
                        <xsl:call-template name="notification-links"/>
                        <!-- Alerts -->
                        <xsl:call-template name="alerts"/>
                    </ul>
                </div>
                
                <span class="ametys-header-action-invoker"
                      data-target-show="#action">
                    <span class="ametys-header-action-invoker__icon material-icons filter_list"></span>
                </span>
            </div>
        </div>
    </xsl:template>

If you have overloaded the template "main-zone page or page-2-columns templates, the template must be reused to insert the "Follow page" button in the <div class="page_actions">

Example for the "page" template

<xsl:template name="main-zone">
        <div>
            <xsl:attribute name="class">
                <xsl:text>ametys-main-content-inner</xsl:text>
            </xsl:attribute>
            <div class="ametys-main-content-body">
                <xsl:call-template name="bread-crumb"/>
                <xsl:call-template name="page-actions"/>
                
                <a name="content"></a>
                
                <xsl:if test="not($deactivateFOEditionToolbar = 'true')">
                    <xsl:call-template name="fo-toolbar-page"/>
                </xsl:if>
                            
                <zone name="default" level="1"/>
                <br style="clear:both"/>
            </div>
        </div>
    </xsl:template>
    
    <xsl:template name="page-actions">
        <div class="page_actions">
            <xsl:call-template name="matomo-stats"/>
             <xsl:if test="$pageFollowEnabled = 'true' and not($deactivatePageSubscription = 'true')">
                <xsl:call-template name="page-subscription"/>
             </xsl:if>
        </div>
    </xsl:template>

Activation of the notification center and page tracking depends on a site parameter. It is necessary to activate notification center and page tracking in the site settings to test proper integration in your declination.

The notification center displays notifications related to the user's current theme subscriptions.
To test the notification center's integration, insert the "My subscriptions" service to subscribe to one or more themes. Select the instantaneous frequency and the "Intranet" channel to ensure that the notification center is not empty. All you have to do is modify/validate a theme's content to see it in the notification center.

Back to top