Conditional Bookmarks

Happy New Year everyone! Hopefully you are well rested and getting back into the swing of BIP. I took 2 weeks with a huge list of to do's ... sadly I managed only 2/10! A friend once told me to put a couple of things on a list that I had already done so I could tick them off immediately and feel good about my progress :0) Im pleased to say the 2 I did get done were real tasks so all was not lost.

Got a mail today from a customer having some issues conditionally showing bookmarks for a PDF output or a table of contents for HTML output. I blogged some of the solution a while back but thought I would share a template today to avoid any confusion.

Here's the template

bm1.jpg

  • Param - <?param@begin:_xf;"html"?> - this declares the output format parameter that the server will pass to the template at runtime.
  • if PDF - <?if:$_xf='pdf'?><?convert-to-bookmark:?> - if the output is going to be PDF then create the book marks
  • Then we have the first instance of the TOC in the template
  • EI - <?end convert-to-bookmark:?><?end if?> - closing out the if and the bookmarks
  • if HTML - <?if:$_xf ='html'?><?copy-to-bookmark:?> - if the output is going to be HTML then leave things as a TOC
  • Then we have the second instance of the TOC in the template
  • EI - <?end copy-to-bookmark:?><?end if?> - closing the if and copy

Not too tough and once the template is deployed to the server you will get the desired effect in the output of choice. Template available

here
.

Comments:

Hi,

Can you please tell me how to create dynamic bookmarks in an RTF output.

Thanks
Sukumar

Posted by Sukumar on October 23, 2012 at 11:08 PM MDT #

Post a Comment:
  • HTML Syntax: NOT allowed
About

Follow bipublisher on Twitter Find Us on Facebook BI Publisher Youtube ChannelDiscussion Forum

Join our BI Publisher community to get the most and keep updated with the latest news, How-to, Solutions! Share your feedback and let us hear your voice @bipublisher on Twitter, on our official Facebook page, and Youtube!

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today