Exceptions for Particular Page

No comments Leave a comment »
As part of Best Practices, use as few foundation/Master Pages as possible for a project.

For one particular site, I was delighted to see all the pages looked like they could be accommodated by one single template. Except one page. This index page did not display the headline of the page, where all the other subpages did. The absence of this one element meant I needed to change my entire template structure, or build a new template just for the index page.

Ha - Noway!

Instead I made a template exception using render tags and the page GUID.

 <reddot:cms>
  <if>
   <query valuea="Guid:<%info_pageGuid%>" operator="==" valueb="Guid:27EBF76820A042B08C64C86FD72CDA2F">       
      <htmltext>
      </htmltext>
    </query>
    <query type="else">
      <htmltext>
<h1><%hdl_title%></h1>
      </htmltext>
    </query>
  </if>
</reddot:cms>

I created an info placeholder "GUID of Page" to pull the page GUID to valuea. Then I compare it to the GUID of the index page. I found the GUID of the index page by looking under "Page Information" in SmartEdit. GUIDs (Gloabl Unique Identifier) are assigned to pages, elements, and content classes. RQL uses GUIDs to handle passing commands through the API. In this case, I am assigning the index page's GUID to valueb and comparing valuea to valueb.

If valuea equals valueb then write nothing:
<htmltext></htmltext>

Else write headline
<htmltext>
<h1><%hdl_title%></h1>
</htmltext>
 

About This Entry

Published on Monday, April 27 2009 at 05:25 PM by Tiffany France in the WebCMS (OpenText Management Server) blog.
Tagged with: GUID headline

Need Help?

If you need immediate assistance, please contact the Help Desk at (804) 828-2227 or submit a ticket online. You can also submit feedback through our Feedback form above or leave a comment on specific blog entries.

Don't Get Phished

Don't be a phishing victim - VCU and other reputable organizations will never use email to request that you reply with your password, social security number or confidential personal information. Learn more about phishing »

No comments below.

There are currently no comments. Be the first to respond.

Add your thoughts