64534261F9724C95A00484731EB96591
  • RedDot CMS Blog
  • 27.02.2017
  • EN

rdb: An undocumented RenderTag to enhance your RedDot CMS usability

Ever had a call from a RedDot CMS editor like this:

The RedDot CMS Context Menu
RedDot CMS Usability – Show page status / Release a page

"Hi there, I have published my page three times now but the changes don’t show up on the website!
…OH… hold on..
… uhm ..
.. I haven’t released the page, whoops.. bye.. <click – hang up>"

That’s what I call a usability issue within RedDot CMS.
Your author clearly should see at any given time what the page status is.
 

Three important statuses for your page an author needs to know

  • Page is checked out
    A user is editing the page, it needs to be submitted to workflow and released to publish changes
  • Page is waiting for release
    The page is waiting for approval or review and will not be published before this has happened
  • Page is released
    Page is good to go and will be published as it is in your Content Management System
     

Display the status using RenderTags

Since version 7.5 there is the RedDot CMS API also known as RenderTags.
It is a .NET based notation to address the property map of your content pages.

A simple RedDot tutorial snippet in PHP to display the page status:

 PHP & RenderTags 
<?php
   $state = '';
   $tmp = trim(strtolower('<%!! Context:CurrentPage.State !!%>'));
   if ($tmp == 'checkedout') $state = 'Status: checked out';
   if ($tmp == 'waitingforrelease') $state = 'Status: waiting for release';
   echo $state;
?>

The important line to access the RedDot RenderTags API for the page status is this one:

 RenderTags 
<%!! Context:CurrentPage.State !!%>

Place it somewhere in your CMS page to display the current status of the page or ablock of content within your CMS page. Make sure you use the IoRangeRedDotModeOnly to ensure this information doesn’t get published.
 

A complete example to return the status as a string

 RenderTags 
<!IoRangeRedDotMode>  
<%!! Context:CurrentPage.State !!%>
<!/IoRangeRedDotMode>

Using the .NET based RedDot CMS API there is no need for RedDot Query Language (RQL) to determine the page status anymore. This makes the page load faster and your authors hopefully a lot happier.

       

Downloads

 

QuickLinks

 

Channel