Difference between revisions of "Attach a PDF to a Web Page View"

From SmartWiki
Jump to: navigation, search
Line 2: Line 2:
  
 
The attached PDF file(s) will not not visible when viewing the web page in HTML mode, but will be appended when exported as a PDF, saved as a PDF, emailed as PDF or created by a [[Workflow]] as attachment.
 
The attached PDF file(s) will not not visible when viewing the web page in HTML mode, but will be appended when exported as a PDF, saved as a PDF, emailed as PDF or created by a [[Workflow]] as attachment.
 +
  
 
'''Sample Codes'''
 
'''Sample Codes'''
* Append a PDF file from a [[Smart Folder]] '''before''' the current [[Web Page View Field]] page.
+
* Append a PDF file from a [[Smart Folder]] '''before''' the current [[Web Page View Field]] page:
 
 
 
<pre>
 
<pre>
<!- - @ssattach(before;/files/1234/123/myfile.pdf )- ->
+
<!--@ssattach(before;/files/1234/123/myfile.pdf )-->
 
</pre>
 
</pre>
  
* Append a PDF file from a [[Smart Folder]] '''after''' the current [[Web Page View Field]] page.
+
 
 +
* Append a PDF file from a [[Smart Folder]] '''after''' the current [[Web Page View Field]] page:
 
<pre>
 
<pre>
<!- - @ssattach(after;/files/1234/123/myfile.pdf )- ->
+
<!--@ssattach(after;/files/1234/123/myfile.pdf )-->
 
</pre>
 
</pre>
  
3.  Appending current web page field to a PDF file from a [[Custom Field|custom field]] (single file type).
+
 
 +
* Append a PDF file from a [[Custom Field|custom field]] (single file type) '''before''' the current [[Web Page View Field]] page:.
  
 
<pre>
 
<pre>
<!- - @ssattach(before;@attach pdf file@)- ->  
+
<!--@ssattach(before;@attach pdf file@)-->  
 
</pre>
 
</pre>
 
::::or  
 
::::or  
 
<pre>
 
<pre>
<!- - @ssattach(before;@#xxxxxxx#@)- -> where xxxx is customfield id.
+
<!--@ssattach(before;@#xxxxxxx#@)--> where xxxx is customfield id.
 
</pre>
 
</pre>
  
 
'''Rules'''
 
'''Rules'''
  
* Directives can be placed anywhere inside the field, more than one directive can be used like this.
+
* The '''ssattach''' function can be placed anywhere inside the [[Web Page View Field]]
 
+
* Multiple files can be attached from different sources:
 
<pre>
 
<pre>
  
-----------------------------------------------------------------------------------------------
+
<!--@ssattach(before;/files/1234/123/myfileheader.pdf )-->
<!- - @ssattach(before;/files/1234/123/myfileheader.pdf )- ->
+
<!--@ssattach(after;/files/1234/123/myfilefooter.pdf )-->
<!- - @ssattach(after;/files/1234/123/myfilefooter.pdf )- ->
+
<!--@ssattach(after;/files/1234/123/myfileappendix.pdf )-->
<!- - @ssattach(after;/files/1234/123/myfileappendix.pdf )- ->
+
<html><body>
 
 
 
 
    <html><body>
 
 
   My Pdf file
 
   My Pdf file
</body></html>
+
</body></html>
  
 
</pre>
 
</pre>

Revision as of 15:57, 2 June 2009

You can use the ssattach function to append one or more PDF documents stored in either a Custom Field or Smart Folder to a Web Page View Field.

The attached PDF file(s) will not not visible when viewing the web page in HTML mode, but will be appended when exported as a PDF, saved as a PDF, emailed as PDF or created by a Workflow as attachment.


Sample Codes

<!--@ssattach(before;/files/1234/123/myfile.pdf )-->


<!--@ssattach(after;/files/1234/123/myfile.pdf )-->


<!--@ssattach(before;@attach pdf file@)--> 
or
<!--@ssattach(before;@#xxxxxxx#@)--> where xxxx is customfield id.

Rules

  • The ssattach function can be placed anywhere inside the Web Page View Field
  • Multiple files can be attached from different sources:

<!--@ssattach(before;/files/1234/123/myfileheader.pdf )-->
<!--@ssattach(after;/files/1234/123/myfilefooter.pdf )-->
<!--@ssattach(after;/files/1234/123/myfileappendix.pdf )-->
<html><body>
  My Pdf file
</body></html>

  • All page settings will driven by first PDF document file, either it is a static file or generated by SmartSimple


SSlogic

  • Using @customfield@ instead of smart folder file (like @parent.contract@)
  • Use if sslogic like this:
<!- -@sslogic(‘@type@’=’contact’) - ->
       <!- -@ssattach(after;/files/1234/123/myfilefooter.pdf )- ->

<!--@else-->
     <!- - @ssattach(after;/files/1234/123/myotherfilefooter.pdf )- ->
<!--@end-->