how to call a template in a widget?

52 views
Skip to first unread message

Ki

unread,
Apr 11, 2012, 10:53:31 AM4/11/12
to MediaWiki Widgets
Hello,
I have a custom widget which is basically a jquery image slideshow.
Within the slideshow widget I need to include a list of images to be
shown. I would like to have the list of images nested in a template so
other users can add images. I am hoping to be able to place the widget
within different articles and have a template for that article page
listing articles.

{{#Widget:ImageGallery|parameter=template1}}

can someone provide tips on how to implement this? specifically within
the widget how can I give it a a parameter like a template parameter?
Also on article pages what is the exact syntax to use to show the
widget + template1 ? Thanks

Sergey Chernyshev

unread,
Apr 11, 2012, 12:00:40 PM4/11/12
to mediawik...@googlegroups.com
Well, widgets support parameters already so if you want users to enter them, they can now, just open any widget that uses parameters and see the code.
I think the most complicated I wrote was Google Maps:

If you want users to edit templates to somewhat limit the parameters users enter and set other widget parameters to default values, then you can simply wrap a widget in a template.

In any case, you're only limited by your imagination and Smarty templating language, well also by the fact that widgets themselves can't use templates inside them, but only parameters passed to them.

Hope this helps.

         Sergey



--
You received this message because you are subscribed to the Google Groups "MediaWiki Widgets" group.
To post to this group, send email to mediawik...@googlegroups.com.
To unsubscribe from this group, send email to mediawiki-widg...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/mediawiki-widgets?hl=en.


Reply all
Reply to author
Forward
0 new messages