Macros You can use macros to display various kinds of data in your pages. Inserting Metadata Values If you want to insert the Title, Author or any other metadata field in a document-specific Page Types, such as Document ToC, Title Content or Access Denied, use a macro in the following format... %TAG_VALUE_OBJECT(Name of Field,Value to Insert if Field is Empty)% For example, to insert a Document's Title... %TAG_VALUE_OBJECT(Title,)% Or Keywords... %TAG_VALUE_OBJECT(Keywords,)% Or to include the path to a cover image (from a field called "Cover") in an image call... img src="%TAG_VALUE_OBJECT(Cover,) Display Dependent on Context If you want a string to displayed only when certain conditions exist, you can use macros that test for a certain context, using the format... %IF_CONTEXT_VALUE_BEGIN(context name,match value)%Your code here%IF_CONTEXT_VALUE_END% For example, if you want display a message only to users who are logged in, you'd do something like... %IF_CONTEXT_VALUE_BEGIN(LOGGED_IN,TRUE)%Message to logged in users here%IF_CONTEXT_VALUE_END% For example, if you want display a message only to users who are NOT logged in, you'd do something like... %IF_CONTEXT_VALUE_BEGIN(LOGGED_IN,FALSE)% your text here %IF_CONTEXT_VALUE_END% in a free HTML block and the text will be displayed if user has not been logged in into the system. You can further narrow the users who will see the message to those logged in as members of a particular Account Set like this... %IF_USER_SET_BEGIN(UserSetName)%Congratulations! You are a member of this set.%IF_CONTEXT_VALUE_END%
Previous Page Next Page