Difference between revisions of "ArticleView Options"
Yvonne.milne (Talk | contribs) (→Data Merging) |
Yvonne.milne (Talk | contribs) (→Deploy Workspace) |
||
(One intermediate revision by the same user not shown) | |||
Line 8: | Line 8: | ||
[[File:bm-noteicon.png|top|40px|link=]]<div style="position:absolute;top:3px;margin-bottom;bottom:5px;margin-left:50px;"> | [[File:bm-noteicon.png|top|40px|link=]]<div style="position:absolute;top:3px;margin-bottom;bottom:5px;margin-left:50px;"> | ||
From v9.3, ArticleView sections can be used to handle document data merging. See [[#Data Merging|Data Merging]] below. | From v9.3, ArticleView sections can be used to handle document data merging. See [[#Data Merging|Data Merging]] below. | ||
+ | </div> | ||
+ | <span style="height:6px;"> </span> | ||
+ | </div> | ||
+ | |||
+ | <div style="height:40px;margin-bottom:5px;padding:5px;border:0px solid orange;border-left:5px solid orange;background:#fff8dc;vertical-align:middle;position:relative;"> | ||
+ | [[File:bm-noteicon.png|top|40px|link=]]<div style="position:absolute;top:3px;margin-bottom;bottom:5px;margin-left:50px;"> | ||
+ | From v9.4, ArticleView sections articles can also include embedded WebViewWidgets. See [[#Embedded WebViewWidgets|Embedded WebViewWidgets]] below. | ||
</div> | </div> | ||
<span style="height:6px;"> </span> | <span style="height:6px;"> </span> | ||
Line 218: | Line 225: | ||
[[Category:Lianja v9.3]] | [[Category:Lianja v9.3]] | ||
[[Category:Lianja v9.4]] | [[Category:Lianja v9.4]] | ||
+ | [[Category:WebView Based Sections]] |
Latest revision as of 10:09, 12 April 2024
Contents
See Also
ArticleView Section Attributes, Attachments Options, DocumentView Options
Overview
ArticleView Sections are used to display HTML pages with a default bootstrap theme.
From v9.3, ArticleView sections can be used to handle document data merging. See Data Merging below.
From v9.4, ArticleView sections articles can also include embedded WebViewWidgets. See Embedded WebViewWidgets below.
From v8.0, click the Edit Article button to open the HTML file in the WYSIWYG HTML editor in place:
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.
See Embedded WebViewWidgets below with details of the expanded example_datamerge App in v9.4.
This is supported in desktop and web Apps. Here the example_datamerge App is running in the browser:
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:
And here in the Attributes tab:
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:
Click New Article to create a new article. You will be prompted to enter a filename:
Then the HTML Editor will be opened:
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
Here are the categorized articles:
Click Manage Articles to open the OS file manager in the articles directory. From here, you can delete or rename the files:
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:
Printing
Merged documents can be printed to PDF. The Section Header Show Print button must be set to true:
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
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:
Here, shown with Merge data disabled:
Note this is a Windows system with the Lianja App Builder installed on the E: drive.
And here in the editor:
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.
Deploy Workspace
From v9.3, ArticleView files have their own category section in the Deploy Files tree.