Home » Documentation > Introduction » Embedding a View

Embedding a View

Embedding a stand-alone view follows essentially the same procedure as for embedding an entire application, including the optional “apppath” (virtual directory) and “params” settings, although in this case entries in the “params” setting will refer to web properties of the view, rather than those of the web app.  The difference is that within the shortcode you specify view=”oYourView”, where oYourView is the actual object name of the view in your DataFlex code: Object oYourView is a cWPWebView.

In addition to the standard properties of a cWebView, the class cWPWebView defines an additional two web properties designed to control the appearance of embedded views on a WordPress page (intended to be set in the WordPress shortcode params):

  • psTheme (String, default: “”) allows a DataFlex CSS theme to be specified for the view
  • pbShowToolBars (Boolean, default: True) determines whether the program’s command bars (the Find and File toolbars) should be displayed above the view (in the shortcode, set the property using 1 for True, 0 for False)

As with the embedded application, you will usually want to put the page for your view on a WordPress menu to make it accessible to other users of the site.