// you’re reading...

CMS

RedDot CMS Render Tags – The Ultimate List


On this page we will collect all documented and undocumented RedDot CMS RenderTags.
The idea is, that if you have a RenderTag you’d like to add, just post it as comment with a quick description of what it does and what version of OpenText CMS you’re using and I will add it here.

' Time of last change
<%!! Context:CurrentPage.ChangeTime !!%>
' GUID of user who changed page
<%!! Context:CurrentPage.ChangeUserId !!%>
' GUID of user who created the page
<%!! Context:CurrentPage.CreateUserId !!%>
' Getting an element value from a standard element in the current page
<%!! Context:CurrentPage.Elements.GetElement(std_elem).Value !!%>
' Check if it has a page in current language variant
<%!! Context:CurrentPage.ExistsInCurrentLanguage !!%>
' ?
<%!! Context:CurrentPage.HasVersionData !!%>
' Returns headline element of current page
<%!! Context:CurrentPage.Headline !!%>
' Checks if the page is currently locked
<%!! Context:CurrentPage.IsLocked !!%>
' GUID of user who has locked current page
<%!! Context:CurrentPage.LockingUserId !!%>
' Time of last save
<%!! Context:CurrentPage.SaveTime !!%>
' GUID of user who saved the page
<%!! Context:CurrentPage.SaveUserId !!%>
' State of the page (for usage/details see link below about usability)
<%!! Context:CurrentPage.State !!%>
' GUID of the used template for the current page
<%!! Context:CurrentPage.Template.Id !!%>
' Content class name of the used template for the current page
<%!! Context:CurrentPage.Template.Name !!%>
' Optimized tag to Get Element Values (version 10.1 SP1 HF1 and above)
<%!! Context:Pages.GetPage(Guid:D72F8CC0B2494BD39A74C52912E6B54E).GetElementByName(elementName).GetHtml() !!%>
' Tag to reference pages instead of creating links that are followed (version 10.1 SP1 HF1 and above)
<%!! Context:Pages.GetPage(Guid:[GUID PAGE B]).GetUrl(Bool: True) !!%>

Loaders

Loaders are responsible for type safety in the Render Tag system by parsing the following content and casting it inside the processing framework.
They are identified to the left of the colon (:) so in <%!! Context:CurrentPage.ChangeTime !!%> the loader is Context. Each loader also has a series of members being the first element immediately to the right of the colon (:), in the previous example, CurrentPage.
The following table describes the default loaders and their members. The middle column specifies parameters to members that are methods and the return value for members that are properties.

Array:

Create()

params object

Takes an unlimited number of parameters and creates an array

CreateInStore()

string, params object

As with create except the first parameter indicates a storage tag that the result in saved into. See StoreLoader

Sort()

array

The array to sort

IndexOf()

object, array

object, array, int

object, array, int, int

Returns the index (position) of an object in an array

As above but 3rd param indicates start index for search

As above but 4th param indicates count to search through

LastIndexOf()

object, array

object, array, int

object, array, int, int

As above but searching from the end…

Bool:
or Boolean:

[literal]

 

Cast a literal as a Boolean

Context:
or RdObj:

CurrentPage

IPage

Get the current page

CurrentIndex

IPageIndex

Get the current index item (as in navigation index item)

CurrentMasterPage

IPage

Get the current master page

CurrentLanguageVariant

ILanguage

Get the current language

CurrentProjectVariantId

Guid

Get the id of the current project variant

CurrentProjectId

Guid

Get the id of the current project

CurrentRenderMode

int

Get the current render mode. See
RenderModes

CurrentUserId

Guid

Get the id of the current user

FirstIndex

IPageIndex

Get the navigation index item of the first page in the breadcrumb stack

LastIndex

IPageIndex

Get the navigation index item of the last page in the breadcrumb stack

CurrentLevelCount

int

Get the number of levels that will be processed (? To be confirmed)

CurrentDepth

int

Get the current depth of processing

Pages.GetPage()

Guid

Retrieve an IPage for the given PageId for the current project/language

Pages.Render()

Guid

Guid,Guid

Guid, Guid, Guid

Render the page with the given PageId and return the output

Render the page with the given MasterPageId and PageId respectively and return the output

Render the page with the given MasterPageId, PageId and TemplateId respectively and return the output

Indexes.RootIndex()

 

Get the root index item

Indexes.GetIndexById()

Guid

Get the index item by its Guid

Indexes.GetIndexByPage()

IPage

Get the navigation index for the given IPage

Indexes.GetIndexByPageId()

Guid

Get the navigation index for the given PageId

Indexes.RootIndexList()

 

Gets an IPageIndexList for the current breadcrumb stack

Params.GetKeys()

 

return an array of all keys to all the params stored on the context object*

Params.Set()

object

pass an object to set the value of a parameter

Params.[KeyName]()

 

call as a method the keyed parameter you want to return

Debug:

Set()

bool

Enable or disable debug mode

Get()

 

Returns whether the system is in debug mode

Escape:
or RdEscape:

Null or null

 

Emits the value null

NewLine

 

Emits the string “rn”

Br

 

Emits the string “<br />”

Tab

 

Emits the string “t”

Space

 

Emits the string “ ”

NbSp

 

Emits the string “ ”

EmptyString

 

Emits the string “”

OpenTag

 

Emits the string “<”

CloseTag

 

Emits the string “>”

CDataBegin

 

Emits the string “<![CDATA[”

CDataEnd

 

Emits the string “]]>”

BeginTag()

string

Emits “<tag>” where tag is the value of the parameter to the method

EndTag()

string

Emits “</tag>” where tag is the value of the parameter to the method

SingleTag()

string

Emits “<tag />” where tag is the value of the parameter to the method

Space()

int

Emits the number of spaces specified in the parameter

String()

int, string

Emits a string containing the second parameter repeated the number of times specified in the first

Text()

string

Emits the contents of the parameter as a string

HtmlEncode()

string

Emits the parameter after html encoding using System.Web.HttpUtility::HtmlEncode()

HtmlDecode()

string

Emits the parameter after html decoding using System.Web.HttpUtility::HtmlDecode()

Guid:

[literal]

 

Cast a literal as a Boolean

Int32:
or Int:

[literal]

 

Cast a literal as a 32-bit integer

Navigation:

OutputArea()

string

string, bool

string, bool, bool

string, bool, guid

 

Page:

GetPage()

 

 

GetUrl()

 

 

Rendering:

GetOutput()

 

 

GetHtml()

 

 

RenderObject()

 

 

VisualizeObject()

 

 

Store:
or
RdStore:

Set() or SetItem()

string, object

string tag to store against and object to be stored

Get()

string

retrieves and object from storage by tag

String:
or Str:
or RdString:

[literal]

 

Cast a literal as a String

* The context object stores many properties in a hashtable called “Params”, many of these are mapped to members of the Context Loader but it possible to store arbitrary values and retrieve them again as well as manipulating them through code. This requires a thorough understanding of the execution order of Render Tags.

Supporting Classes & Info

RenderModes

  • Preview = 0
  • SmartEdit = 1
  • Publish = 2
  • Debug = 3

IPage

ChangeTime

DateTime

 

ChangeUserId

Guid

 

CreateTime

DateTime

 

CreateUserId

Guid

 

Elements

IPageElementList

 

ExistsInCurrentLanguage

bool

 

FileName

string

 

HasVersionData

bool

 

Headline

string

 

IsLocked

bool

 

IsNew

bool

 

LockingUserId

Guid

 

MainLink

IPageElement

 

SaveTime

DateTime

 

SaveUserId

Guid

 

State

PageState

 

Template

ITemplate

 

TemplateId

Guid

 

Delete()

Session

Session, bool, bool

Must pass in the “session” containing LoginId and SessionKey but have not discovered how to get one of these yet

As above but manually set RQL flags force2910 and
force2911

Rename()

string, Session

New headline and “session” as above

IPageIndex

 

 

 

 

 

 

ILanguage

 

 

 

 

 

 

IPageElementList

 

 

 

 

 

 

IPageElement

 

 

 

 

 

 

ITemplate

 

 

 

 

 

 

PageState

 

 

 

 

 

 

Session

LoginId

int

 

SessionKey

string

Tags

FileRead
<fileread filename=”" />

ForEach
<foreach object=”" itemname=”">
</foreach>

If
<if>
<query operator=”" valuea=”" valueb=”">
</query>
<query operator=”" valuea=”" valueb=”">
</query>
<query operator=”" valuea=”" valueb=”">
</query>
<query type=”else”>
</query>
</if>

The value of the operator attribute can be:
!= being “not equals”
st,lt,< being “a < b” is true
eqst,eqlt,<= being “a <= b” is true
gt,> being “a > b” is true
eqgt,>= being “a >= b” is true
anything else is treated as “equals”
Additional tags can be nested within the “query” elements.

Navigation

Output

Process

Store

Spots

Synchronous XML Spot
<reddot:cms></reddot:cms>

Asynchronous XML Spot
<reddot:asynccms></reddot:asynccms >

Direct Spot
<%!! !!%>

This document is a work in progress page, so
please add your knowledge in the comments where you see fit!

Kudos go to

Michael Phillip
Paul Gibson
Richard Hauer

Things you can do with RenderTags

Got something you wanna share?

If you’ve got any RenderTags you’d like to add share them here!
Just leave a comment with RenderTag, description and CMS version below. Thanks.

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!

Discussion

17 comments for “RedDot CMS Render Tags – The Ultimate List”

  1. ‘ GUID of current project variant

    ‘ GUID of current project

    ‘ GUID of current User

    Posted by Michael Philipp | February 21, 2011, 6:03 pm
  2. A couple from the 10.1 SP1 Release Notes:

    2.1.1 Optimized RenderTag to Get Element Values

    Management Server Version 10.1 Service Pack 1 Hotfix 1 introduces an optimized RenderTag to Get Element Values:
    <%!! Context:Pages.GetPage(Guid:D72F8CC0B2494BD39A74C52912E6B54E).GetElementByName(elementName).GetHtml() !!%>

    The values are cached and will not be updated automatically. It can only be updated manually be deleting the PageCache. This RenderTag is intended to be
    used for reading single element values of pages which normally are not changed.

    2.2.6 Render Tag parameter for referencing pages

    If you have a page A with a Render Tag creating a link to a page B, the publishing process will consider page B as following page and continue publishing.

    If this is not intended and you want page B not to be considered as a following page, you can use the new Boolean parameter that is available with Management
    Server 10.1 SP1:
    <a href=”<%!! Context:Pages.GetPage(Guid:[GUID PAGE B]).GetUrl(Bool: True) !!% >”>Link</a>

    With the value true, the link will only be considered as a navigation link and will
    be considered as not relevant for following pages.

    With the value missing or false, the functionality will be unchanged.

    Posted by Paul G | March 1, 2011, 7:07 am
  3. Just as an FYI, Safari barfs when viewing this page (in that it doesn’t display the render tags, but does display the comments in the code snippet).

    Posted by Joel Kinzel | March 2, 2011, 11:31 pm
  4. Very useful indeed. Thanks Markus.

    A good foundation for a wiki page when we get that online on the Solution Exchange.

    Regards,

    Dan

    Posted by Danny Baggs | March 29, 2011, 8:06 am
  5. Great Work! Really an excellent comprehension.

    Posted by Boris Crismancich | April 1, 2011, 7:36 am
  6. Curious about the async. reddot tags. What is the difference, and what do you gain/lose by using them? Or perhaps when is it appropriate to use them?

    Posted by Joel Kinzel | April 18, 2011, 10:35 pm
  7. Great work. Very useful. It would be great if Open Text could include this as an appendix to their documentation!

    Posted by Richard Smallwood | April 21, 2011, 1:38 am
  8. Hi,

    thanks for the rendertag list! Its amazing!

    Please, please could somebody document the function of some of the rendertags like GetOutout or VisualizeObject….

    Yours cincerly,

    Bobby from Linz

    Posted by Robert Kararic | April 21, 2011, 10:34 am
  9. I have successfully got the Pages.Render() tag to work on existing pages in a project. I would love to use this to inject template code (html header code) into other projects.

    Do you know if this particular method or a similar method is possible with template code? I have yet to come up with anything that will work.

    Thanks!

    Posted by Todd | April 27, 2011, 8:26 pm
  10. I have pulled this information together by “reflectoring” the .Net libraries in Navigation Manager and the various RedDot services.

    I am working, in my limited spare time, to fill in holes and add many many additional properties and methods.

    I think turning this into a SolEx WIKI project is the right thing to do, so that people can add comments, descriptions, examples and what works (and doesn’t) for each of the methods and properties.

    Mr Baggs…

    Posted by Richard Hauer | May 4, 2011, 4:42 am
  11. Is there a way to set/change the value of a page-element via rendertags i.e. in preexecute-area?
    Or are rendertags just for output?

    Posted by Martin | May 20, 2011, 12:21 pm
  12. Has anyone use the Array loader? If so, can you provide an example? Is it possible to look through the array?

    Posted by Joel Kinzel | August 1, 2011, 5:17 pm
  13. Any way to get the current elements pageorder?

    I tried the following, but it didn’t work:

    <%!! Context:CurrentPage.Elements.GetElement(hdl_Headline).CurrentIndex() !!%>

    Posted by Fulvio | November 14, 2011, 6:49 am
  14. Has anybody got FileName working, i.e., Context:CurrentPage.FileName?

    I want to display the page’s intended filename in SmartEdit.

    Posted by Neil Fegen | July 19, 2012, 4:21 pm
  15. Management Server Version 9.
    I have a case where we need to get the path and filename of an image placeholder that is not defined to provide just the path and filename. Essentially, I want to parse out the SRC attribute value without writing script to do that. Is there a way you know of?

    Posted by Robert | July 27, 2012, 6:39 pm
  16. Hello, does anybody skill with using the render tags

    on CMS version 11? The tags return nothing :(

    Thnax

    Posted by Dalibor Srutek | August 21, 2012, 3:17 pm
  17. Hello, does anybody have skill with using the render tags

    Context:CurrentPage.IsLocked Context:CurrentPage.LockingUserId

    on CMS version 11? The tags return nothing :(

    Thnax

    Posted by Dalibor Srutek | August 21, 2012, 3:18 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...