Embedding Random Content in Web Pages
The onCourse web site allows you to edit the content of your web pages, just using a web browser. But sometimes you want to display random messages or mix the contents of multiple pages. Maybe you want to show a teaser to a random web page on your home page, but only if it is tagged with the “New Pages” tag. Maybe you’d like to show the title and description of a number of pages in one page, with links to the pages. Maybe you’d like to add the complete contents from one of a group of specially tagged blocks of content.
There are two simple ways to do all of these:
{page} rich text markup
You can enter your “random” text into a new web page and use the {page…} rich text markup to embed it in the detail content of another web page or a web block. This new web page with the “random” content does not have to be in your site navigation or even directly accessible by your visitors.
{page template:“Page info and link” tag:”/Subjects/Work” }
The parameters are as follows:
template – the name of the Template used to display the page (see below for description of templates). If not specified (or if a template with this name is not found), it will display the title of the page as a link to the page.
Once the markup has decided which page to display, that page can be displayed any way you like, because the output of this markup is determined by the template that you specified. Each template can display any text, plus any details about the page (eg author and modification date), plus many other powerful web components used elsewhere in the onCourse web site. It could be as simple as the title of the page, linking to the page. Or it could be a nice box with rounded corners, with the title of the page, the first 100 characters of its content, and a “more info…” link. It could even list all the children of that page with links to them.
You can have as many different templates as you want, customising the display of each {page} markup you use.
At the moment these templates can only be configured by ish, so if you want to use templates, please contact us to find out what is possible.
code – if specified, only the page with that code will be displayed. Otherwise, a random page will be displayed. The code can be either a direct page access eg “/page/123” or an alias eg “/news/july/24”
tag – if specified, the random choice is restricted to pages with this tag. Pages can be tagged using the “Tags” section of the web page editor (using a browser, not using the onCourse client).
{block} rich text markup
You can enter your “random” text into a new web block and use the {block…} rich text markup to embed it in the detail content of a web page or another web block. This new web block does not have to be displayed in a region on all pages, but can be a “general purpose” block.
{block name:“My Fancy Block” tag:”/Special/sport” }
The parameters are as follows:
name – the name of the Web Block. If you have more than one blocks with this name, it will randomly select one.
tag – if specified, the random choice is restricted to blocks with this tag. Blocks can be tagged using the “Tags” section of the web block editor (using a browser, not using the onCourse client).
Newsletter subscription
ish makes regular updates to ish onCourse, and we like to let our customers know about them as soon as they're available.
Latest News
- Have your say about the future of AVETMISS 1 Jul 2010
- onCourse 1.7.21 3 Jun 2010
- What is a managed web solution really all about? 6 May 2010
- onCourse 1.7.19 bug fix release 19 Apr 2010
- onCourse 1.7.17 bug fixes 25 Feb 2010
