[All Adaptavist Apps]

Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Expand
Hide content for specific page titles
Hide content for specific page titles

You can hide content if the current page has a specific title, for example:

Code Block
{builder-hide:title=My Homepage}
This is not my home page!
{builder-hide}

This can come in handy if you are using templates to generate content and want to hide something based on the page title.

Alternatively, you might want a specific page title to be used whenever a certain template is used, for example:

Code Block
{builder-hide:title=Meeting}
(!) Please rename this page to "Meeting" to aid consistency throughout this site.
{builder-hide}

Another use is to add labels to pages based on their title:

Code Block
{builder-hide:title=Home}{add-label:not-home-page}{builder-hide}

Simply add that to the Header panel in theme config and any page that is not called "Home" will get a label of "not-home-page" added to it thanks to the add-label macro. This is useful because it allows you to search all pages that aren't a home page within the site!

Expand
Expand
Hiding content based on metadataHiding content based on metadata

(warning) Alain to fill this bit in as I have no idea how it works! Also note the hierarchical nature of the checking on this.

Hiding content based on attachments
Hiding content based on attachments

This works if used in a page or a news item.

Code Block
 
{builder-hide:attachment=foo.jpg,bar.png}
hide this if either foo.jpg or bar.png are attached to the current page/news
{builder-hide}

...