Create a CMS block tag

A CMS block tag is used for advanced block creation and site flexibility.

Before you begin

Role required: content_admin or admin

About this task

It is constructed as <g:content_block> {{Jelly_Tags|Jelly]] and can be used in either of the following ways.
  • Blocks: to display a block inside a block.
  • Layouts: to display a block inside a layout.

The tag appears in the format, <g:content_block type="<type>" id="<sys_id>"/>.

An example of the block tag is included in the ESS Portal sample site.

Procedure

  1. Navigate to Content Management > Design > Frames.
  2. Click cms_admin_home_frame.
  3. View the code.
    <style>
    
    DIV.cms_administration_home {
    	background: url(gray_${current_page.getURLSuffix()}.pngx) no-repeat right top;
    }
    
    </style>
    
    
    <div class="cms_administration_home">
       ${body}
    <br/>
    <!-- Would you like to pivot off of parent page instead?  try this snippet 
       <j:if test="${current_page.getParentPage().getURLSuffix()=='administration'}">
          <g:content_block type="content_block_menu" id="7afc342def002000914304167b2256ac"/>
       </j:if>
         The defaults use the page URL suffix to define sub menus
    -->
       <j:if test="${current_page.getURLSuffix()=='administration'}">
          <g:content_block type="content_block_menu" id="7afc342def002000914304167b2256ac"/>
       </j:if>
       <j:if test="${current_page.getURLSuffix()=='community_inspired'}">
          <g:requires name="ess.portal.globals.jsdbx" />
          <g:content_block type="content_block_menu" id="ccd4b8c7efb70000914304167b22566e"/>
       </j:if>
    <br/>
    </div>
  4. To see what the page looks like, navigate to the ESS Portal administration page. For example, http://instance name.service-now.com/ess/administration.do.