1 hemeac Dec 24, 2007 02:28
3 hemeac Dec 26, 2007 17:55
That fixed the problem. Thanks.
4 yabba Dec 26, 2007 19:23
cool :D
committed to cvs
¥
5 esanchez Dec 28, 2007 22:09
hemeac,
When you were working with the widget stuff, did you find a way to manually call a widget by itself instead of having to call the entire set of widget in the sidebar?
For example, I just want to call the "Linkblog" widget, not the entire set of widgets on the sidebar.
Edgar.
6 esanchez Jan 18, 2008 04:48
Has anybody had a chance to review this qusetion?
How can one call a single widget via php code from the index.main.php file?
I don't want the entire set of "side bar" widgets. I just want the "Comments" and LinkBlog"
7 afwas Jan 18, 2008 05:14
8 edb Jan 18, 2008 05:40
Afwas wrote:
... You still need a container, even if it occupies only one widget. ...
Actually that's technically not true. I've lost the code for it by choice, but calling a single widget without a container is very possible. When I figure it out I was like "it's that easy???", but this does NOT mean losing containers is a good idea.
OTOH if I want to add something totally unique, like PHP code in the middle of my sidebar for example, I would have to split my sidebar into two containers then add my extra code between the container calls. Not the worst fate in the world, but not very elegant if you ask me. The 'old way', in this situation, was much cleaner.
The drawback to calling individual widgets is that ALL widgets will have to be called that way. Plus what you do is turn your back on the future direction of the core software, and what's the point of that?
Sorry for the OT reply, but "technically speaking you don't need containers" is a true statement.
9 afwas Jan 18, 2008 06:13
Never mind being OT.
A widget is technically speaking a plugin so you might get away without a container. Might come in handysome day. But it's sooo easy simply copy a container, rename the constructor variable and done.
10 yabba Jan 19, 2008 14:53
/**
* Template tag. Display a Widget.
*
* This load the widget class, instantiates it, and displays it.
*
* @param array
*/
function skin_widget( $params )
;)
¥
Crack open inc/_core/ui/forms/_form.class.php and meander down to 1780 (ish ) and change the existing code to look like this and see if it solves things for you :
¥