ArticleView Options

From Lianjapedia
Jump to: navigation, search

See Also

ArticleView Section Attributes, Attachments Options, DocumentView Options

Overview

ArticleView Sections are used to display HTML pages with a default bootstrap theme.

Bm-noteicon.png

From v9.3, ArticleView sections can be used to handle document data merging. See Data Merging below.

Bm-noteicon.png

From v9.4, ArticleView sections articles can also include embedded WebViewWidgets. See Embedded WebViewWidgets below.

ArticleView Section


From v8.0, click the Edit Article button to open the HTML file in the WYSIWYG HTML editor in place:

ArticleView Section


ArticleView Section


example_component

The example_component App includes an ArticleView Section (section3). Find the example_component App listed under 'Examples|General' in the App Names explorer panel in the Apps Workspace.

example_datamerge

The example_datamerge App includes an ArticleView Section (section1) with merged data from the current record. Find the example_datamerge App in the 'Examples|Demo Cloud Apps' category in the Home Workspace or Apps Workspace.

See Data Merging below for more details.

ArticleView Section options

The following ArticleView Section section-specific options are available:

Database

The Database Attribute defines the database name for the data source for data-bound ArticleView Sections.

Table

The Table Attribute defines the table name for the data source for data-bound ArticleView Sections.

Data source

The Data source Attribute defines the varchar/memo column name for data-bound ArticleView Sections.

File

The File Attribute defines the HTML file to be displayed in the Section. In the example_component App, this is:

barrytest.html

As shown in the screenshot above, clicking on the keyboard icon in the Section header opens the file in the HTML Editor.

CSS stylesheet

The CSS stylesheet Attribute defines the custom CSS stylesheet for the article. From v9.0.

Note that ArticleView sections include bootstrap by default. See the articleview.rsp Lianja Server Pages script file for included stylesheets.

Editable

The Editable Attribute determines whether the file specified above is editable (based on user roles and permissions).

Merge data

The Merge data Attribute determines whether HTML content should be merged. Use {macros} in the HTML.

From v9.3. See Data Merging below for more details.

Selectable

The Selectable Attribute determines whether the article is selectable by the end-user (operates as article viewer).

From v9.3. See Data Merging below for more details.

In the Page Builder Assistant, the equivalent option is Article viewer

Article viewer

The Page Builder Assistant Article viewer option determines whether the article is selectable by the end-user (operates as article viewer).

From v9.3. See Data Merging below for more details.

In the App Inspector Attributes, the equivalent option is Selectable

Data Merging

From v9.3, ArticleView sections can be used to handle document data merging. The following functionality is now supported:

  • Macro substitution when an article is displayed
{macro}
  • File insertion from the templates/articles directory. Filename may be static text or a .rsp, .pysp or .jssp server page.
{template:filename}
  • File insertion from the App's directory. Filename may be static text or a .rsp, .pysp or .jssp server page.
{insertfile:filename}

The example_datamerge App included in the distribution demonstrates the use of an ArticleView section for data merging.

Bm-noteicon.png

See Embedded WebViewWidgets below with details of the expanded example_datamerge App in v9.4.

ArticleView Data Merging


This is supported in desktop and web Apps. Here the example_datamerge App is running in the browser:

ArticleView Data Merging


Attributes

New attributes have been added:

  • Merge data: Enable/disable {macro} substitution for data merging
  • Selectable / Article viewer: Enable/disable the display of the article viewer to allow user article selection

Here in the Page Builder Assistant:

ArticleView Data Merging


And here in the Attributes tab:

ArticleView Data Merging


Buttons

With the Editable attribute set to true, the following buttons will be displayed:

  • New Article
  • Edit Article
  • Manage Articles

Clicking the Edit Article button (as shown in the previous screenshot) will open the HTML Editor to edit the article:

ArticleView Data Merging


Click New Article to create a new article. You will be prompted to enter a filename:

ArticleView Data Merging


Then the HTML Editor will be opened:

ArticleView Data Merging


Note that by default, articles will be added to the General category. The file specified above as demo1 has been created as:

General__demo1.html

To specify a different category, name the file in the following format:

category__filename

Below, a second new file is specified as demo2 in the Documentation category:

Documentation__demo2

and will be created in the Library articles sub-directory as:

Documentation__demo2.html
ArticleView Data Merging


Here are the categorized articles:

ArticleView Data Merging


Click Manage Articles to open the OS file manager in the articles directory. From here, you can delete or rename the files:

ArticleView Data Merging


User Selection

If the Article viewer option / Selectable attribute is set to true, clicking on an article name in the article viewer will load that article into the ArticleView section:

ArticleView Data Merging


Printing

Merged documents can be printed to PDF. The Section Header Show Print button must be set to true:

ArticleView Data Merging


Clicking the print icon will then create an output.pdf file in the App's directory and open it in the system's default PDF viewer. Here shown in Desktop App View

ArticleView Data Merging


Embedded WebViewWidgets

From v9.4, articles can include embedded WebViewWidgets. The example_datamerge sample App has been expanded to include the following WebViewWidgets:

Here it is running in Desktop App View:

ArticleView Data Merging


Here, shown with Merge data disabled:

ArticleView Data Merging


Note this is a Windows system with the Lianja App Builder installed on the E: drive.

And here in the editor:

ArticleView Data Merging


See Using WebViewWidgets for more built-in WebViewWidgets.

You can also create your own custom WebViewWidgets coded in LianjaScript (.rsp file), Python (.pysp file) or JavaScript (.jssp file) and embed them in an Article. See Developing a Custom WebViewWidget for full details.

See also the blog article Working with HTML Articles in Lianja 9.4

Library Workspace

From v9.3, ArticleView files have their own category section in the Library Files tree. Right-click to display the context menu and select New Article... to create a new ArticleView File and open the HTML Editor.

ArticleView Data Merging


Deploy Workspace

From v9.3, ArticleView files have their own category section in the Deploy Files tree.

ArticleView Data Merging