• Currently 5/5
  • 1
  • 2
  • 3
  • 4
  • 5
Widget Set Custom Field


This plugin allows authors to select on a page-by-page and entry-by-entry basis, which widgets they wish to appear in the sidebar of their blog (for the given entry or page).

This is accomplished by defining a new custom field type called "Widget Set". When added as a custom field to a page for example, a new form element will appear in the edit page screen that allows the author to select from a list of known widget sets.

The plugin also provides a template tag called <mt:IfWidgetSetExists> that will return true if a named WidgetSet exists and false otherwise.

Installation Instructions

  1. Download the WidgetSetCustomField.tar.gz file
  2. Unpack the file on your server.
  3. Copy the contents of the WidgetSetCustomField folder to your MT home directory. When you are finished, you should have a single file installed in the following directory: /path/to/mt/plugins/WidgetSetCF/WidgetSetCF.pl
  4. Done.

You should now have a "Widget Set" custom field type to choose from when creating new custom fields.

Screenshots

Requirements

This plugin requires that Widget Manager be installed and enabled. It also required the Movable Type Professional Pack.

5 Comments

I can't understand the instructions for this plugin at all. All there is is a text file. Is that all there is to this plugin?

I successfully installed the plug in on Movable Type Commercial version 4.25 with: Community Pack 1.62, Professional Pack 1.3

I do not know how to set the Custom Fields in relation to the plugin type. Specifically the Name, Basename, and Template Tag catagory. When I experiment I end up having to uninstall plugin and start over.

Secondly, I do not know what to enter in the sidebar template module once I create the custom fields associated with the plugin...

Any help would be appreciated.

email@alexaobrien.com

Nevermind:

I uninstalled this widget and created a custom field pulldown menu in the custom fields (one as entry and one as a page) custom field both named sidebar.

I set the tag name for each respectively to "entrywidgetset" or "pagewidgetset" and then wrote this code in the sidebar template:

Sidebar: Sidebar:

Scratch that!

Here is the solution for multiple custom page and entry sidebars.

Create sidebar custom field under page and entry. Set name to side bar, basename to either "entrywidgetset" and "pagewidgetset" respectively and tag name to similar "entrywidgetset" and "pagewidgetset". Add options under Drop Down Menu that you know will correspond to respective sidebar widget sets that you have created or will create.

Then add this code to your sidebar template module (I just copied and pasted from my template so the eq="NAME" is from my project you can fill in yours depending on your options for page and entry widget sets:


<mt:If tag="pagewidgetset" eq="Consulting Sidebar">
          <$MTWidgetSet name="Consulting Sidebar"$>
<mt:Else tag="pagewidgetset" eq="CS Sidebar">
          <$MTWidgetSet name="CS Sidebar"$>
<mt:Else tag="pagewidgetset" eq="EIA Sidebar">
          <$MTWidgetSet name="EIA Sidebar"$>
<mt:Else tag="pagewidgetset" eq="CM Sidebar">
          <$MTWidgetSet name="CM Sidebar"$>
<mt:Else tag="entrywidgetset" eq="Thinking Sidebar">
          <$MTWidgetSet name="Thinking Sidebar"$>
<mt:Else tag="pagewidgetset" eq="Archive Sidebar">
          <$MTWidgetSet name="Archive Sidebar"$>
<mt:Else tag="pagewidgetset" eq="Error Sidebar">
          <$MTWidgetSet name="Error Sidebar"$>
</mt:If>

Leave a comment

Have a question? Please use the MT Forums. Notes submitted on documentation should pertain to tips & hints regarding documentation. Your note may be removed once its contents have been integrated into the body of the page.