[All Adaptavist Apps]

Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0

{use-layout} macro

(info) Requires Theme Builder 3 or above

Excerpt

This macro allows you to automatically change the layout used for a specific page, optionally latching that layout for the rest of the user's session.

(warning) page under construction - see wiki notation guide (when editing a page using wiki markup mode) for more info

Parameter

Mandatory

Default

Notes

default

(tick)

 

The ID of the layout to use

latch

(error)

false

Whether to latch the layout for subsequent page views throughout the site:

  • false – only change the layout for this page
  • true – change the layout for all pages
Code Block
{use-layout:LAYOUTID}

{use-layout:LAYOUTID|latch=true}

Hints and Tips

You can use this macro to create URLs for mobile phone users, etc., that will automatically select an appropriate layout when accessed.

Expand
Show me how...
Show me how...

Create a page in a public space and give it a short title, for example: "Mobiles".

If you want a short URL for the page, ideal for sending in a SMS message, use the Tiny URL shown on the page information view or alternatively put the page-info macro on the page to display it:

No Format
{page-info:tinyurl}

Latch the desired layout (eg. a layout with id "mobile" that's designed for small screen mobile phones) with the following:

No Format
{use-layout:mobile|latch=true}

You can display a welcome message on that page or alternatively redirect to another page using the redirect macro:

No Format
{redirect:Home}