Peek-a-Boo Part II: Unhiding pages for RedDot CMS SmartEdit users with some CSS
The latest post from Frederic works very well and your SmartEdit users still will be able to reach the pages inside the RedDot CMS. But for usability reasons you should extend it just for one more step. Let's take the part marked above with "... show navigation ..." as the following code:
That's just fine and in genereal you will always get it with Freds code in SmartEdit.
But you want a user to know quick and easy: Is this page hidden or not?
So what? Just use some simple CSS Code:
-
.navhidden {
-
filter:alpha(opacity=40);
-
-moz-opacity:0.4;
-
-khtml-opacity: 0.4;
-
opacity: 0.4;
-
}
Your HTML / Render Tag code should look like Freds just a bit turned upside down:
-
<reddot:cms>
-
<if>
-
<query valuea="Context:CurrentPage.Elements.GetElement(opt_show_in_navigation).GetHtml()" operator="!=" valueb="String:hide">
-
<htmltext>
-
<!-- ... show navigation for normal "non-hidden" pages ... -->
-
<li><a href="linked_page.html">Linktext</a></li>
-
</htmltext>
-
</query>
-
<query type="else">
-
<if>
-
<query valuea="Context:CurrentRenderMode" operator="!=" valueb="Int:2">
-
<htmltext>
-
<!-- ... show navigation for hidden pages just
-
inside the RedDot CMS system but
-
with an opcity style ... -->
-
<li class="hidden"><a href="linked_page_hidden.html">Hidden linktext</a></li>
-
</htmltext>
-
</query>
-
</if>
-
</query>
-
</if>
-
</reddot:cms>
Using the render tag with the RedDot CurrentRenderMode as posted before veryfies, that the delivered output is wether preview, SmartEdit or publishing mode.

(6 votes, average: 4.67 out of 5)
Am 1. August 2008 um 15:06 Uhr
Hi Frederic,
great work! I know and like your way to work very much.
Cheers
Dorin
Am 17. September 2008 um 11:49 Uhr
Hi Frederic,
very nice! It’s a powerful feature and you can also realise a LiveServer SSL-Switch with this approach. Here is how I did that:
Am 17. September 2008 um 11:51 Uhr
<reddot:cms>
<if>
<query valuea=”Context:CurrentRenderMode” operator=”==” valueb=”Int:2″>
<if>
<query valuea=”Context:CurrentPage.Elements.GetElement(opt_secure).GetHtml()” operator=”==” valueb=”String:ssl”>
<htmltext>
<rde-dm:attribute mode=”condition” source=”request” attribute=”rdeServletServer” op=”contains” value=”80″>
<rde-dm:process mode=”redirect” url=”[#request:rdeHttpsServer#]/[#request:rdePrefix#]/xchg/[#request:rdeSessionID#]/[#request:rdeProjectID#]/[#request:rdeXslID#]/-/[#request:rdeCurrentXmlId#]” status=”301″ />
</rde-dm:attribute>
</htmltext>
</query>
<query type=”else”>
<htmltext>
<rde-dm:attribute mode=”condition” source=”request” attribute=”rdeServletServer” op=”contains” value=”443″>
<rde-dm:process mode=”redirect” url=”[#request:rdeHttpServer#]/[#request:rdePrefix#]/xchg/[#request:rdeSessionID#]/[#request:rdeProjectID#]/[#request:rdeXslID#]/-/[#request:rdeCurrentXmlId#]” status=”301″ />
</rde-dm:attribute>
</htmltext>
</query>
</if>
</query>
</if>
</reddot:cms>