Composr Tutorial: Advanced site structure and flow

Written by Chris Graham
This tutorial contains some advanced information about managing the structure and flow of a Composr website.

The tutorial isn't ordered in any particular way – it is a series of separate pieces of guidance.


Controlling the flow through add screens)

You may want to provide a link to an add screen then redirect the user somewhere else after they've finished. i.e. don't show them the default "what would you like to do next?" screen, send them somewhere specific.

You can do this via the standard redirect parameter, which contains the URL to redirect the user to after an action is performed.

For example, consider this page-link we may have placed on a menu:

Code

cms:cms_news:add
If we want to direct the user to a page that explains how submissions are modified, we could change it to:

Code

cms:cms_news:add:redirect={$PAGE_LINK,site:news_thankyou}
If we want to direct the user back to where they were, we could change it to:

Code

cms:cms_news:add:redirect={$SELF_URL}

For example, if we have a template that has a URL passed into it, like say:

Code (HTML)

<a href="{URL*}">Go somewhere</a>
 
We could change it to:

Code (HTML)

<a href="{URL*}?redirect={$PROTECT_URL_ESCAPING&*,{$PAGE_LINK,site:news_thankyou}}">Go somewhere</a>
/
<a href="{URL*}&redirect={$PROTECT_URL_ESCAPING&*,{$PAGE_LINK,site:news_thankyou}}">Go somewhere</a>
 
(depending on whether the URL contains an "?" already or not, which typically depends on your URL Scheme)

See also


Feedback

Please rate this tutorial:

Have a suggestion? Report an issue on the tracker.