Technical Support
posted this on Feb 01 14:34
Before starting, let me give you an advise, take few minutes to get familiar with TW's architecture through this brief introduction: http://support.touristway.com/attachments/token/123737946163cb42c6a...
Each showcase has own settings, the most important are:
Time to write some code. We will reuse an existing template to make things smoother, however you know changing it is as easy as replacing the file name in 'usetemplate' attribute.
Let's clear the field from any conflict by creating a new type of showcase we can use for this example:


We'll do this example with a bunch of travel guides. Please create 3 or 4 travel guides from the administration area and link them to the showcase n.9 you just created (you will find it in the list on the left with the name you assigned it before)
Run your TW workbench ('templates' menu) and locate the page where you want to add your new showcase. Then click on the 'page: edit' link in the workbench box on top
Now enter this code to instance your new showcase using the amonymous component 'showcase'.
<component id="myshowcase" class="showcase">
<catalogue>guide</catalogue>
<itemsperpage>3</itemsperpage>
<exposure>9</exposure>
<usetemplate>%-system.lngtemplatepath-%hlib/comm/showcase3.html</usetemplate>
<renderto>myshowcaseoutput</renderto>
<datasetalias>
<alias id="results">components.myshowcase.results</alias>
</datasetalias>
</component>
Scroll down and locate the point where you want to place your new showcase, then just type the placeholder name as per <renderto> attribute:
%-myshowcaseoutput-%
Publish your changes and reload the page. You should see your new showcase listing 3 of the guides.
Depending on where you placed the placeholder it may not look exactly as you expected. You can adjust the look by editing the template, it's just HTML with few variables to represent dynamic content.
Note that TW workbench gives you handy shortcuts to open the template of each component in the page to do your changes.

NOTE: Some showcases are shared among all templates so their configuration is centralized at /fwlib/viewportinner.xml
You can download and edit this file from the FILES menu
In the file you will find the same kind of code described above.