0
edits
Changes
no edit summary
==General Description==
A '''Web Page View''' field is used to create a “document” based on underlying [[Entity|entity]] data. The field type has a wide variety of document management options associated including the conversion to '''PDF''' or '''XML'''.
==Field Display==
[[Image:Display_only_wpv_ex1.png]]<br />
''Display Only Special - Web Page View, in View Mode''
[[Image:Display_only_wpv_ex2.png]]<br />
''Display Only Special - Web Page View, in Document Window – some Options enabled''
{{FieldOptions}}
{{FieldFormattingOptions}}
==Special Field Options==
* '''HTML Template''' – the body of the document combined with variables from the underlying [[Entity|entity]]. The content of this field should conform to any [[Accessibility legislation]].
* '''Enable Printing''' – enables the [[User|user]] to print the resultant document.
* '''Enable Editing''' – enables the [[User|user]] to edit the document with the [[HTML Editor]]
* '''Enable Switching Language''' - adds a Language Switcher dropdown at the top of the Web Page View: [[Image:Cf-wpv-3.png|150px|link=|150px]]
* '''Render As XML Document''' – indicates that the document is to be prepared as an [[XML]] output.
* '''Default User ID as File Name''' - when using the PDF or HTML '''Save to Multiple File Field''' options (explained below) the filename of the file stored within the [[Multiple Files]] field will be named with the [[userid]] of the current user. See also the '''File Name''' PDF option below.
* Deprecated - '''HCAI Enabled''' - See [[HCAI Overview]] for additional information.
* Deprecated - '''HCAI Automatically Redirect''' - See [[HCAI Overview]] for additional information.
<nowiki>
<style><!-- .FormInstructions{display:none;} --></style> </nowiki>
{{HTMLOptions}}
==Value Storage==
{{ValueStoresTo}}
* '''Enforce Selection''' - makes the [[Multiple Files]] custom field selected as the '''Value Storage''' field the only field the file can be stored to.
{{CFPermissionsTab}}
==Notes==
'''sslogic'''Web Page View fields can use a unique SmartSimple logic interpreter. Web page logic gives you the ability to display certain content or perform certain actions only when specified conditions are met.
SmartSimple logic follows the following template:
<nowiki><!--@sslogic(CONDITION)-->
The content to be displayed when condition is true
<!--@end--></nowiki>
'''Hyperlink to Web Page View'''
You can create a link to a web page view field using the following syntax:
<a href="@''wpv''.value@">Open WPV</a>
Where '''wpv''' is the name of the Web Page View field.
==Multi-Line Text==
To include Multi-Line Text fields in a {{WPV}} you need use the following syntax to ensure that line breaks are displayed correctly when the page is converted to PDF format. <pre><div style="display:block;pd4ml-display:none;white-space:pre-wrap;" >~Narrative~</div><div style="display:none;pd4ml-display:block;white-space:pre;word-wrap:break-word;" >~Narrative~</div></pre>
The first div displays correctly in the {{WPV}} and the second div displays correctly in the PDF version