Loading...
 
Skip to main content

Alternate content by media

This is a feature request idea, as part of Bootstrap theme revamp

It would be nice to have a way to output certain content only for certain media. It should be possible to embed plugins within this content.


But maybe also by browser

  • Firefox vs Chrome vs IE, etc.


Brainstorming


We need a way to apply media queries in various part of Tiki, namely:

  • modules
  • text area content


Plugin Ideas

Output plugin

Idea of a plugin
Copy to clipboard
{OUTPUT(media=print)} This is the print version (ex: high-res image) {ELSEIF media=mobile} Output for mobile devices (ex: Small image) {ELSE} This is the regular output (ex: regular size image) {OUTPUT}

Content plugin

Idea of a plugin
Copy to clipboard
{CONTENT(media=print)} This is the print version (ex: high-res image) {ELSEIF media=aural} Output for audio screen readers (ex: Fangs) {ELSE} This is the regular content (ex: regular size image) {CONTENT}

Types of conditions

  • print
  • pdf (pdf uses print so this could be extra condition. So PDF gets all print + this)
  • slideshow (to hide button "click here to start slideshow")
  • Bootstrap-related sizes (xs, small, etc.)
  • Landscape vs portrait?
  • Firefox, Chrome, Internet Explorer, etc.

Param for plugins

Perhaps a new plugin param?

Idea of a new plugin param
Copy to clipboard
{IMG(media=print)} This image would only be shown in print mode {IMG}

Override default params for plugins

For above to be truly useful, it would be nice to be able to Override default params for plugins.

Show PHP error messages