Help - Search - Members - Calendar
Full Version: Widget Sets And Custom Fields
Movable Type Community Forum > Using Movable Type > Categories and Entry Tags
dkm34
I am using MT4.1 with Professional Pack 1.1. I am attempting to use the
Widget Set Custom Field plugin in combination with the Custom fields.

I have several entries that I would like a specific widget to be displayed in the sidebar. Each entry should display a different widget. I have created the widgets and custom fields for each.

I have added the following code to my sidebar template:

<MTIfNonEmpty tag="entrydatasidebar">
<$MTWidgetSet name="Screenshot entry"$>
</MTIfNonEmpty>


<MTIfNonEmpty tag="EntryDataSidebar-annoyingp">
<$MTWidgetSet name="Annoying People entry"$>
</MTIfNonEmpty>

And so on…

The problem is that only the first custom field is being displayed (entrydatasidebar)… I was careful in each entry to only display the appropriate custom field and select it but for some reason, each entry is showing the first custom field and ignoring the rest. I did not select the entrydatasidebar on the entries (except for the one it should be on) but they are displaying it anyway.

I am at a loss at what to do.

Does anyone have any tips or ideas?
dkm34
After taking a break, I realized what I was doing wrong...

Here is the what the code should like in the template:

<MTIfNonEmpty tag="entrydatasidebar_widget">
<MTentrydatasidebar_widget>
<mt:setvarblock name="widgetset"><MTentrydatasidebar_widget></mt:setvarblock>
<mt:ifwidgetsetexists widgetset="$widgetset">
<mt:WidgetSet name="$widgetset">
</mt:ifwidgetsetexists>
</MTIfNonEmpty>

It is now working! Yay!

I do have another problem now though - it is displaying the name of the widget in the sidebar of the entry as well as the contents of the widget... I'm not sure what to change, it took me quite some time to get it working... Aargh.
shenews
QUOTE (dkm34 @ Jun 5 2008, 11:08 PM) *
I do have another problem now though - it is displaying the name of the widget in the sidebar of the entry as well as the contents of the widget... I'm not sure what to change, it took me quite some time to get it working... Aargh.


Thanks for posting the code that worked. Later folks will appreciate it.

You can edit the widget itself (Design-->Widget Sets --> Widget Manager) to get rid of that. Just delete the "widget-header" line.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.