What is a widget?

A widget is a snippet of HTML or PHP code that can be included through your theme to automate "recurring" tasks.

HTML Block Widgets

For example, if you have a piece of HTML that you want to appear on every page, you can create an "HTML Block" widget to accomplish this. The benefit of this is that you only have to edit the widget once to make the changes reflect throughout your website.

To call a widget, you simply need to use the "Widget Caller", which is formatted like this:

 is disabled...

You can find the "Widget ID" on the "Content > Widgets" page under the "ID" column. For example, you can include the "login_box" widget on any template or custom page by using this widget caller:

 is disabled...

Note that widgets are case sensitive, so "login_box" is not the same as "Login_Box".

Menus

The program comes with a handy menu builder which allows you to create dynamic menus which can include links to any page or website. You can then easily manage these menus without having to edit multiple pages.

PHP Code Widgets

Widgets can be more advanced than this, employing PHP code to execute advanced tasks. The program comes with several example widgets, such as the "Featured Product Box" or the "Member Spotlight Box". These allow you to perform tasks like querying the database to display dynamic information, such as a featured product in your store or a "spotlighted member".

Note that creating a "PHP Code" widget requires extensive knowledge of PHP and should only be done by knowledgeable programmers. Our extension store features a number of widgets that can be easily downloaded and installed on your membership site.

Article Links

Related Articles

Article Tags

  • No tags found.

Details

Published on 2013/05/10.
Last updated on 2013/05/10.

Was this article helpful?
Yes (0) - No (0)