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

 Warning about ELSEIF
We do not have ELSEIF concept in wiki-plugins yet. That functionality would need to be developed. ELSEIF() would conflict with the plugin start syntax. Hence it would need to be something like suggested below to not break existing plugins. Only ELSE works so far as of Tiki 21.x
Idea of a plugin
{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
{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
{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.