Campsite 2.3 User Guide

Campsite 2.3 User Guide

Select your language:  
    Search:   
<5.3.7. Local        5.3.9. List of Issues>

Print / Download:
Available languages: english Last update: 2005-08-04 13:04:21

5.3.8. Topic

Purpose:

Sets the runtime environment topic to the one selected by the statement constraint. If the statement constraint is not valid the topic is not changed.

Syntax:

Topic name <topic_name>

Select the topic having the specified name. If the supplied name is not a valid one, this parameter is not modified.

Topic off

Deselect topic; the topic is not defined after this instruction.

Topic default

The topic selected is the one provided by the parameter from template start. If this parameter was not defined on template start it's value from now on is undefined.

Constraints:

Cannot be used inside "List Article" statement.


add a note add a note User Contributed Notes
5.3.8. Topic
Sam Liddicott  sam at liddicott dot com
Friday 18th of November 2005 11:10:00 PM
Although topic is automatically appended to URL parameters, this doesn't mean it will always be part of the requesting URL.

(User editing URL for one example)

Your template should also be able to cope with no topic set.

John Pye  john dot pye at student dot unsw dot edu dot au
Thursday 01st of September 2005 04:21:00 PM
> * Is it possible for a document to know the context in which it is
>> being viewed? For example, if I write a 'topics' page, then click
>> through to one of those documents, will I be able to write a link
>> saying "back to other articles about LiveSupport" or whatever
>> (assuming LiveSupport is a topc).

Yes, setting the environment topic (see "3.9.2.7 Topic") will change the
behavior of article lists: only articles having that topic will be listed.

Topic "test:en"
List article
....
EndList

This will produce only articles having 'test' topic. The topic is automaticaly
appended to URL parameters so you don't have to set the topic in the current
page:

template1.tpl:
<!** Topic "test:en">
<a href="<!** URI>">click here</a> <!-- assume template2.tpl will display this
link -->

template2.tpl:
List article
....
EndList

<5.3.7. Local 5.3.9. List of Issues>

  Last update: 2005-08-04 13:04:21
Website powered by Docmint Last update: 2005-08-04 13:04:21
Total page time: 0.847326040268