On this page

Widget is used to add extra content to a page, where the content is shown depending on the location of the widget. Location limits the scope of a widget, it can be a particular page (Location = Page) or all pages of an app (Location = App) or every pages (Location = Site). Section is the position where the widget content is shown on a page. A section is associated with a BlockHolder in a layout, ultimately the layout, as the name implies, decides where each BlockHolder is shown on a page (to view these blocks visually, add "nam=sgblock" to the URL of the webpage  e.g: https://sitegui.com/store/hosting-plans?nam=sgblock). A layout should support the following sections/BlockHolders:

  • block_head: should be attached to <head> tag, should contain non-visible content such as scripts or CSS (inline or URLs)
  • block_header: should be displayed at the header of a page (where logo and menu are displayed)
  • block_spotlight: should be displayed where attracts most attention from viewers
  • block_left: should be displayed to the left of the page
  • block_right: should be displayed to the right of the page
  • block_top: should be displayed at the top of the page
  • block_bottom: should be displayed at the bottom of the page
  • block_main: should be displayed as the main content. Page content is shown here
  • block_footnote: should be displayed near the end of a page but before the footer area
  • block_footer: should be displayed at the end of a page 
  • content_header: should be displayed at the header of the main content
  • content_spotlight: should be displayed where attracts most attention from viewers
  • content_left: should be displayed to the left of the main content
  • content_right: should be displayed to the right of the main content
  • content_top: should be displayed at the top of the main content
  • content_bottom: should be displayed at the bottom of the main content
  • content_footnote: should be displayed near the end of the main content but before the footer area
  • content_footer: should be displayed at the end of the main content

A widget can be attached to one or many sections on a page and one or many locations. The widget location will track all locations the widget is attached to. Widgets are also loaded as snippets to be used with SiteGUI Visual Editor where they can be used/shown within a page content. However, the location is not tracked with this mode.

Creating a New Widget

Create a new widget simply by clicking on the New () menu and choose one of the available Widgets. Then specify a name for your widget and use the widget GUI to design your widget. It is not necessary to specify a Widget location and a section at the beginning, you can do that when your widget is fully completed.

Adding/Removing Widget Location

If you have Page::publish permission, you can choose a Location, section to attach the widget to. Multiple locations/sections are supported. To see all locations, just click on Location button. Next to each location, there is a button for you to remove that location to detach the widget from that location. You can also specify the order in which the widget is displayed at that section, this is useful when there are other widgets at the same section and you want to arrange them to display in your preferred order.

Managing Widgets

Clicking on Widget in the App Listing menu will show all current widgets with their type and locations. Widget can be created or cloned from an existing one by any staff but only be attached to a Location by staff having Page::publish permission. Attached widget cannot be saved or deleted by unauthorized staff, a cloned widget is created in that case instead so modification can be made. The modified widget can always be attached to replace the original one later by an authorized staff.