Author:Brendon Upson
Email:bupson at wnc.net.au
Subject:NEW TAG: <P@ComputedPage ....
Category:Development
Message:

Introducing computed pages!

<P@ComputedPage name="pgSub2" value="p2" @P>

This will automagically retrieve a page called p2 from the design collection and insert it in the current page (in place of the tag). In your action code, just add:
ActionDocument.setItemValue("pgSub2", "p3");
Which will cause the server to insert page p3 in that spot instead.

This is very useful for hiding or showing navigation panels etc based on user's rights, eg:

if(pSession.hasUserRole("Admin"))
{
    ActionDocument.setItemValue("navPanel", "NavigationAdmin");
}
else
{
    ActionDocument.setItemValue("navPanel", "NavigationStandard");

}


.... set to an empty string to not show any page at all


Threads:
NEW TAG: <P@ComputedPage ....   Brendon Upson 25.Jul.05
    RE: NEW TAG: <P@ComputedPage ....   Chris Bekas 29.Jul.05
        v3.20 supports ComputedPage   Brendon Upson 31.Jul.05
            3.22 has much better support   Brendon Upson 12.Oct.05