Geo SCADA Knowledge Base
Access vast amounts of technical know-how and pro tips from our community of Geo SCADA experts.
Link copied. Please paste this link to share this article on your social media post.
Originally published on Geo SCADA Knowledge Base by Anonymous user | June 10, 2021 03:07 AM
📖 Home Back
In some cases it is desirable customise the WebX interface by either adding or removing buttons from the toolbar. To do this, a basic understanding of XML and XSLT is required.
For a basic background into XSLT, W3 Schools is a good starting point:
ClearSCADA uses XML to pass information to the client web browser when using WebX. This XML is then transformed into XHTML using a set of XSL files found in:
C:\Program Files\Schneider Electric\ClearSCADA\WWW\XSL
The layout of the menu buttons themselves is handled through the following XSL file:
C:\Program Files\Schneider Electric\ClearSCADA\WWW\XSL\layout.xsl
To add a button, find the following section in "layout.xsl"
<xsl:for-each select="Links/Link"> <xsl:call-template name="Button"> <xsl:with-param name="href" select="@href"/> <xsl:with-param name="text" select="text()"/> <xsl:with-param name="last" select="boolean( position() = count( ../Link ) )"/> </xsl:call-template> </xsl:for-each>
In the above code, a button is created for each "Links/Link" in the source XML document. To create additional buttons, expand this section with some additional customised buttons:
<xsl:for-each select="Links/Link"> <xsl:call-template name="Button"> <xsl:with-param name="href" select="@href"/> <xsl:with-param name="text" select="text()"/> <xsl:with-param name="last" select="boolean( position() = count( ../Link ) )"/> </xsl:call-template> </xsl:for-each> <xsl:call-template name="Button"> <xsl:with-param name="href">http://www.google.co.uk</xsl:with-param> <xsl:with-param name="text">Google</xsl:with-param> <xsl:with-param name="last" select="true()"/> </xsl:call-template>
Removing buttons is again done in "layout.xsl". Find the following section:
<xsl:for-each select="Links/Link"> <xsl:call-template name="Button"> <xsl:with-param name="href" select="@href"/> <xsl:with-param name="text" select="text()"/> <xsl:with-param name="last" select="boolean( position() = count( ../Link ) )"/> </xsl:call-template> </xsl:for-each>
A button is created for each "Links/Link" in the source XML document. To remove a particular button, we need to prevent the Button template from being called in particular cases. This can be done by modifying the code as follows:
<xsl:for-each select="Links/Link"> <xsl:if test="text() != 'Lists'"> <xsl:call-template name="Button"> <xsl:with-param name="href" select="@href"/> <xsl:with-param name="text" select="text()"/> <xsl:with-param name="last" select="boolean( position() = count( ../Link ) )"/> </xsl:call-template> </xsl:if> </xsl:for-each>
In this case, if the "text() != 'Lists'", the button will be created. However, If "text() = 'Lists'" the button will not be created and the List button will be removed.
The following button types exist and can be removed in this way:
In Internet Explorer click on the 'Tools' menu and then 'Internet Options'
On the 'General' tab in the 'Browsing History' section click the 'Delete' button.
On the 'Delete Browsing History' dialog select the top five checkboxes (as shown below) and then click the 'Delete' button
Once you have completed these steps close Internet Explorer and then open it again to launch your WebX session.
Go: Home Back
Link copied. Please paste this link to share this article on your social media post.
Create your free account or log in to subscribe to the board - and gain access to more than 10,000+ support articles along with insights from experts and peers.