XSLT utility for Symphony CMS that adds a simple admin bar in the top of the site when logged in as a developer/author, displaying options like 'logout' or 'back to admin'
Switch branches/tags
Nothing to show
Clone or download
Pull request Compare This branch is even with joaobarbosa:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
README.markdown
admin-bar.xsl

README.markdown

Front-end Admin bar


This is a XSLT utility for Symphony CMS that adds a simple admin bar in the top of the site when logged in as a developer/author, displaying options like 'Logout' or 'Back to admin'.


Info


Sample CSS Code

https://gist.github.com/714098


Usage

Add the admin-bar.xsl file to your /workspace/utilities folder.

On your master.xsl (or an specific page you want to use it), import the XSL file...

<xsl:import href="../utilities/admin-bar.xsl"/>

... and call the template right after your body tag:

<xsl:call-template name="front-admin-bar">
	<xsl:with-param name="dev-username" select="'developer-username'" />
	<xsl:with-param name="logged-label" select="'Logged in as: '" />
	<xsl:with-param name="admin-link-label" select="'Back to admin'" />
	<xsl:with-param name="logout-link-label" select="'Logout'" />
	<xsl:with-param name="debug-link" select="'Debug this page'" />
</xsl:call-template>

Required Parameters

  • dev-username: developer's username
    Required for identifying which sidebar options that will be displayed

Optional Parameters

  • logged-label: text that precedes username link
    Default Value: 'Logged in as: '
  • admin-link: text for the administration link
    Default Value: 'Back to admin'
  • logout-link: text for the logout link
    Default Value: 'Logout'
  • debug-link: text for the actual page debug link
    Default Value: 'Debug this page'

Changelog

0.3

  • Developers and authors has different sidebars

0.2

  • Blank page when logged out bug fixed
  • Debug link added

0.1

  • First Release