Modify

Opened 11 years ago

Last modified 10 years ago

#1317 assigned enhancement

Disable Toc in other modes

Reported by: lists@… Owned by: Odd Simon Simonsen
Priority: normal Component: TocMacro
Severity: normal Keywords:
Cc: Trac Release: 0.10

Description

It would be usefull if you could tell the toc menu to disable when other output formats are being used.

For example use with

http://www.trac-hacks.org/wiki/CombineWikiPlugin

Causes the Toc to appear on every single page....

Attachments (0)

Change History (1)

comment:1 Changed 10 years ago by Odd Simon Simonsen

Owner: changed from Alec Thomas to Odd Simon Simonsen
Status: newassigned

Not sure about the history of this, but the 0.11 version includes the following code:

        # Bail out if we are in a no-float zone
        if hasattr(formatter, 'properties') and \
               'macro_no_float' in formatter.properties:
            return ''

It is then basically for the CombineWikiPlugin and similar to 'flip the switch' in the formatter, and plugins like TocMacro will (should) then respect this and not show floating menus. Feel free to file a ticket with that plugin asking it to set the required property if it is missing.

Now, re-reading the code I just notice that the macro will actually disable an inline toc as well - which it shouldn't. A variation of this would be that the macro does not bail out, but instead sets the inline option implicitly so the toc renders once but in inline mode. Any preference?

Modify Ticket

Change Properties
Set your email in Preferences
Action
as assigned The owner will remain Odd Simon Simonsen.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.