Media2Layout Media2Layout

Media2Layout

Created by: Nick Eby

Rating:
Downloaded: 1k times

Media2Layout facilitates the dynamic inclusion of media library artwork into predefined places in your site’s theme. It creates named positions (by default “campaign” and “header”) which can be assigned a media item per each Page.

  • Adds an admin menu item under Themes to edit your Position names
  • Adds a dropdown control when editing Pages to select the images for each Position in that Page

To insert the images into your theme, just add a bit of PHP code to your theme in the appropriate spot, for example:

<?php Media2Layout::banner('foo');?> 

For the position named “foo” this would print an tag for the media assigned to the Foo position of the current page (or print nothing if no media is assigned to that position). Currently it wraps the in a

<

div> with class “media2layout_[position-name]”.

Screenshots

  • The Media2Layout position admin screen
  • Media2Layout annotation for position "campaign" in a custom theme
  • Assigning image from media library to "campaign" position for a Page

Categories

Get New Themes & Resources