Issue Details (XML | Word | Printable)

Key: VISIB-28
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: David Peterson
Reporter: Tiffany Bartlett
Votes: 0
Watchers: 2
Operations

If you were logged in you would be able to see more operations.
Confluence Extension: Visibility Plugin

{show-if:display=print} doesn't work in Confluence 2.5.7+

Created: 14/Nov/07 04:53 PM   Updated: 16/Nov/07 04:35 AM
Component/s: {show-if}
Affects Version/s: None
Fix Version/s: 1.6.0

Time Tracking:
Not Specified

Environment:
System Date Wednesday, 14 Nov 2007
System Time 10:20:01
System Favourite Colour Myrtle
Java Version 1.6.0_02
Java Vendor Sun Microsystems Inc.
JVM Version 1.0
JVM Vendor Sun Microsystems Inc.
JVM Implementation Version 1.6.0_02-b05
Java Runtime Java(TM) SE Runtime Environment
Java VM Java HotSpot(TM) Client VM
User Name apache
User Timezone America/Chicago
Operating System Linux 2.6.18-8.1.14.el5
OS Architecture i386
Filesystem Encoding UTF-8


 Description  « Hide
I can't get {show-if:display=print} to work.

I typed {show-if:display=print} at the top of the section, and {show-if} at the bottom of the section, and the error says "Unsupported display type: print."

I also tried {show-if:display=printing} (that's what the website has) and I get the same error message.

I'm using Confluence 2.5.7 and 2.6. Does this plugin not yet work for the newest version of Confluence?

Thanks!
Tiffany



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
David Peterson added a comment - 15/Nov/07 02:32 AM
Hi Tiffany,

It turns out the documentation was incorrect. It should be:

{show-if:display=printable}...{show-if}.

I have updated the documentation, and the next version will allow all three variations...


David Peterson added a comment - 15/Nov/07 06:49 AM
Documentation has been updated and the plugin now supports 'print', 'printable' or 'printing'.

Tiffany Bartlett added a comment - 15/Nov/07 03:40 PM
Is there a way to put this around the table of contents macro? I want the toc to show in Confluence but not in Word or PDF.

I tried {show-if:display=printable} {toc} {show-if} and the toc wouldn't show on Confluence.

Then I tried {show-if:action=view} {toc} {show-if} and the output is:
<div>
<ul><a href='#DocumentStyleTest-sampledocument-SCOPE'>
<li>SCOPE</li></a>
<ul><a href='#DocumentStyleTest-sampledocument-SubsystemIdentification'>
<li>Subsystem Identification</li></a><a href='#DocumentStyleTest-sampledocument-SystemOverview'>
<li>System Overview</li></a>
<ul><a href='#DocumentStyleTest-sampledocument-%28FLS%29'>..................................................

Thanks!
Tiffany


David Dembo added a comment - 16/Nov/07 12:17 AM
If I assume correctly, the display= property is basically the media= for the HTML style tag.

Try display=screen


David Peterson added a comment - 16/Nov/07 04:35 AM
The display does't relate to 'media' at all - it's hard coded, based on options available in Confluence.

There are two issues here:

1. I think you actually want {hide-if:display=printable}, not {show-if}.
2. Even if you do, you will have the same problem as when using 'action=view'. I've raise a VISIB-29 for that issue.

In the case of {toc}, the best way is probably to use the built-in printable test. Eg:

{toc:printable=false}

Again, it will only work in 'printable' mode, not PDF or Word at present, but a new version of TOC is due out shortly which will rectify that.