Last modified by MammaMia - 8 years ago
372 Views
3 min read

Creating widgets

Widgets are a simple and effective way of displaying your content in your Sidebar and/or Dashboard.

You can create admin or entity dashboard widgets. Admin dashboard widgets are used for app wide communications. Entity dashboard widgets are for displaying entity content.


Sidebar widgets are of three types; entity, comment, or integration. Sidebar widgets are assigned to the sidebar widget area of your theme. Entity sidebar widgets are used to display entity content whereas relationship sidebar widgets display the connected or related connection types of your entity content. Comment widgets must be attached to an entity to display custom comments. Integration widgets are similar to integration views and do not loop the records but combine multiple shortcodes to provide integrated view.(WPAS 4.6.0)


The following describes the fields you can use to configure widgets.



Type

Sets type of the your widget. You can create a Dashboard or Sidebar widget.

Subtype

Sets subtype of the dashboard or sidebar widget.

Attach to Entity

Entity widgets must be attached to already defined entity. The attached entity's content are returned by the widget.

Dashboard widget title

Sets Title of the dashboard widget which will be displayed on the backend dashboard page.

Widget message html

Sets the initial html message of the admin dashboard widget.

Title

Title of the widget which will displayed on the frontend.

Label

Title of the widget which will displayed on the backend.

Widget description

A short description explaining what the widget does.

Template (WPAS 4.6.0)

Sets the frontend framework which will be used to configure the overall look and feel of the widget. If you pick jQuery UI, you can choose your theme from App's Settings under the theme tab.

Header (WPAS 4.5.0)

The header wrapper for the widget layout

Layout

The layout of the entity's content using its widget. It defines how the content will be displayed using the widget. Click Show tags button to customize the content to be returned.

Footer (WPAS 4.5.0)

The footer wrapper for the widget layout

Css

The custom css code to be used when displaying the content. You can leave this field blank and use a common css file for all.

JS (WPAS 4.4.0)

The custom JavaScript code which will be enqueued to the view. Do not include script tags.

CDN JS (WPAS 4.4.0)

Enter semicolon separated JavaScript file urls starting with https. We only accept files from the following sources; cdnjs.cloudflare.com and cdn.jsdelivr.net or raw.githubusercontent.com. All files will be downloaded and merged before getting locally enqueued to the view they are linked to.

CDN CSS (WPAS 4.5.0)

Enter semicolon separated CSS file urls starting with https. We only accept files from the following sources; cdnjs.cloudflare.com and cdn.jsdelivr.net or raw.githubusercontent.com. All files will be downloaded and merged before getting locally enqueued to the view they are linked to.

Entities Per Page

Number of entity content to show per page. Use any integer value or -1 to show all.

List Order

Allows the content to be sorted ascending or descending by a parameter selected. Defaults to descending.

Sort Retrieved Posts By

Allows sorting of retrieved content by a parameter selected. Defaults to date. Choose "Menu Order" for user defined drag and drop sortable entity and taxonomy records.

Show By Status

Retrieves content by status, default value is publish.

Filter (WPAS 4.3)

Set the default filter for the content to be displayed in the widget. You can use widget filters to return for example; featured products, on-sale products etc. You can combine multiple filters with semicolon which triggers AND operator. For example;-attr::emd_product_featured:is::true;tax::product_cat::is::electronics- filter shows the featured products in electronics category

To create a widget


  1. After you created your App, click on Widgets tab.

  2. Click on the Add new widget link.

  3. Select if you want to create Dashboard or Sidebar widget using the type dropdown.

  4. Select Dashboard or Sidebar widget subtype; entity, admin, or sitebar etc using the subtype dropdown.
  5. If you selected entity subtype fill in name and attach your widget to an Entity.

  6. If you selected admin subtype fill in the initial html message. You can always set new messages by clicking on "Configure" link after app generation.

  7. Optionally, create a new layout modifying the default layout by inserting tags.

  8. Fill in the other optional fields such as Entities per Page, List Order etc.

  9. Click Save to finish.


Image Gallery
Related Embeds
Previous Next
Related Panels
Related Articles
Related Documents
Previous Next
Was this information helpful?