ImCMS
6.0.0-beta18-docs
  • Overview of ImCMS
  • Setup
  • Tutorial
  • Design
  • API-Documentation
  • Content Management
  • Advanced Configuration
  • Image Archive
  • BankId
  • User Documentation
  • Developer Documentation
    • Design
      • Template
      • Tags
        • Admin Related Tags
        • Text Tag
        • Image Tag
        • Menu Related Tags
        • Loop Related Tags
        • Metadata Tag
        • TemplateCSS Tag
    • System Configuration
    • Custom Admin Tab
    • Cache
    • Storage
    • Image Processing
    • Apache Solr
    • API
ImCMS
  • Developer Documentation
  • Design
  • Tags
  • Admin Related Tags
  • Edit on GitHub

Admin Related Tags

The admin on the page is the user who matches at least one condition:

  • is a superadmin.

  • has access to the Document Manager.

  • has access to the Admin Page.

  • can publish the current document.

  • can edit some content.

  • has access to Page Info.

IfAdmin Tag

The data inside this tag is included only if the user is the admin.

<imcms:ifAdmin>
    <div>Text visible to admins</div>
</imcms:ifAdmin>

Admin Tag

This tag adds scripts and styles that are used by the system if the user is the admin. Must be in the <head>.

<imcms:admin/>

Usage example

<%@ page contentType="text/html;charset=UTF-8" %>
<%@ taglib prefix="imcms" uri="imcms" %>

<!DOCTYPE html>
<html lang="en">
        <head>
                <meta charset="UTF-8">
                <title>Demo Page</title>
                <link rel="stylesheet" href="${contextPath}/demo/css/demo.css">

                <!--script and styles which are used by the system if the user is an admin-->
                <imcms:admin/>
        </head>
        <body>

                <div>Text visible to everyone</div>

                <imcms:ifAdmin>
                        <div>Text visible to admins</div>
                </imcms:ifAdmin>
        </body>
</html>
Previous Next

© Copyright 2015-2022, ImCodePartnerAB. Revision 07c6cb49. Last updated on Nov 01, 2023.

Built with Sphinx using a theme provided by Read the Docs.