Last modified by eMDPlugins - 2 years ago
33 Views
6 min read

Introduction to views

Views define how content will be displayed in your app's frontend. You can create standard, archive, single, integration, datagrid, search, chart, or taxonomy views.

The following describes the views module fields.



Name

General name for the view. By enclosing the view name in square brackets in a page, post or a text widget, you can display the content returned by the view shortcode's query. The view name should be all lowercase and use all letters, but numbers and underscores (not dashes!) should work fine too. Max 30 characters allowed. If the shortcode is used in a text widget or a page and the content has multiple pages, paginated navigation links are displayed. You can filter the content by generating a shortcode filter using the WPAS toolbar button on a page or post.

Type (WPAS 4.0.0)

Sets the type of view to be created.You can create search, standard, single, archive, taxonomy, chart, and data grid views. All views except single view produce a list of content. The single views display individual entity content. Each entity can only have one single view. Search views are for displaying search results and must be attached to at least one search form. Taxonomy views display the content of a taxonomy. Each taxonomy can have only one taxonomy view. Archive views display a list of entity content. Each entity can have only one archive view. In addition, you can sort, filter the archived content of views using the filter tab. Single views display only one record so they can not be filtered or sorted. If you like to display multiple versions of the archived content of an entity, you can create a standard view. There is no limitation of the number of standard views that can be attached to an entity. Standard views can be put on a page or post using the wpas toolbar button. You can use chart and data grid views for visualization of your content. Chart views are used to graphically represent your content. Data grid views are used to display table-like data with sortable columns and filters.

Attach to Entity

Views must be attached to a pre-defined entity. The attached entity's content are returned by the view.

Attach to Taxonomy (WPAS 2.9.8)

Taxonomy views must be attached to a predefined taxonomy.

Attach to Term (WPAS 2.9.8)

Taxonomy views can be attached to a predefined taxonomy term.

Attach to Form (WPAS 2.9.8)

Search forms must be attached to an already created view. A search view defines the format of how search results will be displayed.

Enable Paged Navigation

Enables navigation links for the results. Navigation links are themed either based on Bootstrap or the selected jQuery UI theme.

Pagination Class (WPAS 4.3)

Add the specified custom css class to ul element. The class definition can be put in the css field. For example, .pagination-lg for larger blocks or .pagination-sm for smaller blocks.

Create Setup Page (WPAS 3.0)

When enabled, creates a setup page for your view upon plugin activation.

Setup Page Title (WPAS 3.0)

Sets the title of the setup page for your view.

Layout

Sets the layout of a single record of your view. You can also edit the source code, add entity attributes, taxonomies.

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.

Entities Per Page

Number of records 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.

Show By Status

Retrieves content by status, default value is publish.

Subtype (WPAS 4.0.0)

Sets the type of chart.

Chart Title (WPAS 4.0.0)

Text to display above the chart. Max:255 char.

Function (WPAS 4.0.0)

Sets aggregation function which will perform an action across all values in each group. Groups can be specified as attributes, taxonomies, dates, or relationships. Aggregation functions only apply on the numeric data for a group. None option does not apply any function. Count returns the count of elements. Null cells are not counted. Average returns the average value of all values. Max returns the maximum value. Min returns the minimum value. Sum returns the sum of all values.

Org Type (WPAS 4.6.0)

Two types of associations are supported;relationship and hierarchical. Relationships are defined in the relationships in menu. The applicable relationships are of one-to-many type and between the same entity with reciprocal option set to false. Exp; Employee to employee relationship with manager and staff roles. Hierarchical type can be set in the entity editor by checking Hierarchical option set to true.

Org Value (WPAS 4.6.0)

Set the name of the relationship to be drawn in Org Type.

Org Size (WPAS 4.6.0)

Sets the whole size of the org chart to be drawn.

Pie Type (WPAS 4.0.0)

Select the type of pie chart.

Axis Type (H) (WPAS 4.0.0)

The horizontal axis with an exception of a bar chart displays the categories in your content. You can use dates, attributes, taxonomies, or relationships as your categories. Date option offers data level and data range features for better categorization.

Axis Title (H) (WPAS 4.0.0)

The title of the horizontal axis. Max:255 char.

Axis Value (H) (WPAS 4.0.0)

Select the specific date, attribute, taxonomy, or relationship for your horizontal axis categories.

Date Level (H) (WPAS 4.0.0)

Select how you want to display your date category. You can use year or month for summarization.

Date Range (H) (WPAS 4.0.0)

Select the date range.

Axis Type (V) (WPAS 4.0.0)

The vertical axis with the exception of bar charts displays the scale of a measure categorized by the horizontal axis. A measure is a property of which calculations (e.g., sum, count, average, minimum, maximum) can be made. You can use dates, attributes, taxonomies, and relationships as your vertical axis measures. Date is a special attribute type and offers data range level and data range features for better categorization.

Axis Title (V) (WPAS 4.0.0)

The title of the vertical axis. Max:255 char.

Axis Value (V) (WPAS 4.0.0)

Select the measure you would to use in your vertical axis.

Date Level (V) (WPAS 4.0.0)

Select how you want to display your date measure. You can use year or month for summarization.

Date Range (V) (WPAS 4.0.0)

Select the range of dates to be used in your measure.

Height (V) (WPAS 4.0.0)

Sets the height of the chart area. Set a simple number in pixels.Example: 100px.

Width (V) (WPAS 4.0.0)

Sets the width of the chart area. Set a simple number in pixels. Example: 100px. Leave it blank for responsive sizing i.e. chart will resize itself based on the screen size.

Legend Position (WPAS 4.0.0)

Position of the legend. Can be one of the following: Bottom - Below the chart. Left - To the left of the chart. In - Inside the chart, by the top left corner. Right - To the right of the chart. Incompatible with the vAxes option. Top - Above the chart. None - No legend is displayed.

Is Stacked (WPAS 4.0.0)

When set, the chart series are displayed on top of one another.

Show Index (WPAS 4.0.0)

When set, it displays the row index as the grid's first column.

Show Hide Columns (WPAS 4.0.0)

When set, it gives the user an option to choose which columns to show/hide in the form of a button.

List (WPAS 4.0.0)

Select the attribute, taxonomy, or relationship identifier you would like to include in your grid by default. Select by clicking on the item.

Columns (WPAS 4.0.0)

Displays the attributes, taxonomies, or relationship identifiers selected from the list. Deselect by clicking on the item.

Enable hierarchical display (WPAS 4.4.0)

Enables hierarchical display

Hierarchical list type (WPAS 4.4.0)

Select the list type which will be used to display hierarchical elements. When using hierarchical display, ul, ol, and li tags are not necessary if -None- option is not selected. In -None- display type, you must enter the ul or ol tags in the header section, in layouts all markup is wrapped inside li tag.

Hierarchical display root class (WPAS 4.4.0)

Sets the root class of the unordered or ordered list in hierarchical display.

Hierarchical display root class (WPAS 4.4.0)

Sets the hierarchical display depth. Leave it blank to display 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.4.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.

Filter (WPAS 4.6.0)

Set the default filter for the content to be displayed in the view. You can use view filters to return for example; featured products, on-sale products etc. You can combine multiple filters with semicolon with triggers AND operator. For example;-attr::emd_product_featured::is::1;tax::product_cat::is::electronics- filter shows the featured products in electronics category. The easiest way to create filters is to use the WPAS button on a page toolbar of the generated app to design a filter and then copy paste the required part here.

To create a view


  1. Click on Views module.

  2. Click on the Add New link.

  3. Create a unique name for your view. The name will be used for the shortcode label.

  4. Select the view type from the dropdown.

  5. Depending on the view type you select, attach your view to a form, entity, or taxonomy/term.

  6. Set the template you would like to use; Bootstrap, None or jQuery UI. Optionally, select Font-Awesome.

  7. Create a layout by inserting attribute, taxonomy, or built-in tags. Optionally, edit the source html view.

  8. Optionally, you can create the header and footer templates. You can can set some css rules which will attached to your view.

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

  10. Click Save to finish.


Was this information helpful?