// you’re reading...


How to show CMS authors the page status

How often do you get called by an OpenText CMS author who’s complaining:

They: My pages won’t publish! The system is broken
You: Did you release your page?
They: Oh, wait, let me check. Uhm.. Nevermind, bye..

Just use the snippet below to include the status of pages inside the CMS pages and/or content blocks. It shows the CMS user straight away if the page has been released or is waiting for release and saves hours of phone calls.
Also: This post is re-using the code from a previous post, which you can find here.

<div class="reddot">
  <p class="right"><strong>Block/Page status: </strong>
        <query valuea="Context:CurrentPage.State.ToString().ToLower().Trim()" operator="==" valueb="String:released">
	  <htmltext><span class="status Released">Released</span></htmltext>
        <query valuea="Context:CurrentPage.State.ToString().ToLower().Trim()" operator="==" valueb="String:checkedout">
          <htmltext><span class="status CheckedOut">Checked Out</span></htmltext>
        <query valuea="Context:CurrentPage.State.ToString().ToLower().Trim()" operator="==" valueb="String:waitingforrelease">
        <htmltext><span class="status WaitingForRelease">Waiting for Release</span></htmltext>

If you look closely you will see in the code above that I’ve added a class to each SPAN tag. If you use this method you can style the element and add colors or icons to show the status to your users.
Here’s a screenshot of a project where a co-worker (Hi, Angel) and I have used this

Showing the content block status to OpenText CMS authors

Showing the content block status to OpenText CMS authors, BOOM!

More? Check our the RedDot CMS tricks section for more.

Share and Enjoy:
  • Print
  • email
  • Twitter
  • Digg
  • Reddit
  • StumbleUpon
  • Google Bookmarks
  • del.icio.us
  • MisterWong
  • Facebook
  • LinkedIn

No related posts.

About the author:

Markus Giesen Markus Giesen is a Solutions Architect and RedDot CMS Consultant, formerly based in Germany. Travelling around the world to find and offer solutions for a better world (in a very web based meaning). He just found a way to do this as part of a Melbourne based online consultant house. On this blog Markus shares his personal (not his employers) thoughts and opinions on CMS and web development. In his spare time you will find him reading, snowboarding or travelling. Also, you should follow him on Twitter!


14 comments for “How to show CMS authors the page status”

  1. Hi Markus

    I do the same using ASP select case statements – does the above offer any performance benefit or are they much the same?

    Posted by Neil Fegen | September 20, 2011, 10:11 am
  2. Hi Neil, I try and build projects without any ASP code. It’s generally quicker to use render tags and not rely on ASP. It’s also seen as future proof by the OpenText crew.
    Also: Feel free to share your code snippet, just make sure you decode it > needs to be > etc.

    Posted by Markus Giesen | September 21, 2011, 1:59 am
  3. Great article Markus!!!

    I do have an off-topic question (sorry for spamming). Are there other editors other than Telerik RadEditor, RedDot Text Editor, and FCKeditor that are compatible with WSM 10.1?

    I do like Telerik the best but just wondering if there’s anything better?

    Posted by Darko Jaksic | September 21, 2011, 5:11 pm
  4. In the meantime, there is this:

    Not perfect but it’s something.

    Posted by Darko Jaksic | September 21, 2011, 5:22 pm
  5. Hi Markus,

    Nice post. If possible, and for added performance, one can assign page status to a javascript variable and performance javascript if conditionals. This way, more performance gained by avoid 2 more page state query rendertag, and 3 more if conditional rendertag.

    Scalability wise, less server resource use when the system has more SmartEdit users.

    Posted by Jian Huang | September 21, 2011, 9:13 pm
  6. I’ve tried this several times and it never seems to display any status other than Released, even if the page needs to be submitted to workflow. Am I missing a step?

    Posted by Carole | September 26, 2011, 9:48 pm
  7. I’m with Jian on this one. If it’s a smartedit only function(i’ve posted my javascript alternative on the google groups) but each to there own… the more alternatives the merrier!

    Another thought is if the content has been released the cms author probably doesn’t care as there are no further action for them to take which may make outputting code when the content is released is unnecessary.

    Posted by Morgan Ritchings | September 27, 2011, 6:43 am
  8. I’m thinking for smallish projects the JS method may seem faster from a development point of view, but it only kicks in when the DOM is loaded and therefore might seem slower to the CMS author?
    Render Tags should run better and better with OpenText moving over to .NET more and more, right? ;)

    Posted by Markus Giesen | September 27, 2011, 7:14 am
  9. Carole, which version of CMS are you using? This seems rather odd. Maybe Jian could help out?

    Posted by Markus Giesen | September 27, 2011, 7:15 am
  10. Version 10.1
    After I posted yesterday, I did try it with a new page and got the Checked Out message, but that didn’t change either when I released the page. It’s acting like the message doesn’t update. Is there a lag time and I’m just not waiting long enough?

    Posted by Carole | September 27, 2011, 5:28 pm
  11. @Carole you might be hitting some crazy caching behaviour. i’d suggest clearing the page/navigation cache between each change in the status and see if that updates the message

    Posted by Morgan Ritchings | September 28, 2011, 1:31 am
  12. Tried clearing the page cache. Still didn’t update the status.

    Posted by Carole | September 28, 2011, 9:58 pm
  13. Markus,

    Great tip, however there is a potential problem with this approach from the user’s perspective.

    If I have a page in a container which is not released, the foundation page will still show the “released” status (which is correct). However, when the user goes to publish, the page in the container won’t update. From the user’s perspective, this is confusing because the status I see is “released” and thus I am thinking everything is good to publish, when in reality it is only the foundation page that is released.

    Of course the work-around would be to put this on every single content class that represents a potential rendered page within the site. The downside to that is, there are a bunch of “status” messages everywhere on the page which may also be confusing to your users.

    Posted by Joel K | October 28, 2011, 5:06 pm
  14. Disregard my last post, I didn’t catch the first line. We are actually working this into our content blocks (pages within pages) in a subtle way, as well as placing this on foundation pages. Here’s to hoping it works!

    Posted by Joel K | October 28, 2011, 6:13 pm

Post a comment

Stay up to date! - Get notified about followup comments

If you don't feel the urge to comment but wish to stay in the loop:
Just enter your email and subscribe to new comments.

Subscribe without commenting

Recent Tweets

  • RT @AirKraft: Transport Canada breakout: they manage 80K pages and 300K assets with WSM(RedDot). Wow! #OTCW 2010-11-11
  • The RedDot usergroup session 'Future of WCM' is in National Harbor 7, now. See you there! #otcw 2010-11-11
  • RT @yttergren: @AirKraft: Calling all WSM(RedDot) devs: share your solutions on http://bit.ly/bgPIof EVERY solution can win an iPad #OTCW 2010-11-10
  • Come to the Solution Exchange session. Enhance your (#reddot) CMS project! Chesapeake 12, 3:20pm #otcw Looking forward to see you there! 2010-11-10
  • More updates...