You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jspwiki.apache.org by Bob Paige <bo...@gmail.com> on 2008/06/26 18:00:54 UTC

table of contents in the left menu?

Rather than remembering to put the [{TableOfContents}] plugin in every page
in my wiki, it occurred to me to put it in the LeftMenu page, but this
doesn't work so well. Has anyone else considered this, or come up with a
more graceful solution?

When I put it in the LeftMenu, I doesn't display as well, and it still puts
a big "Table Of Contents" header on it even if there are no headings in the
page.

Ideas?

-- 
Bobman

Re: table of contents in the left menu?

Posted by Janne Jalkanen <Ja...@ecyrd.com>.
>
> Returning the plain string "tableofcontents.title" is not very  
> userfriendly.
>
> Why not returning something more usefull, like an in-page link to the
> actual 'first' rendered toc ?

Why not?  Or we could also return just an explanatory text.

/Janne

Re: table of contents in the left menu?

Posted by Dirk Frederickx <di...@gmail.com>.
>> Is there a reason why the TOC is only rendered the first time on a page ?
>>
>>
>> if( context.getVariable( VAR_ALREADY_PROCESSING ) != null )
>>            return rb.getString("tableofcontents.title");
>
> Yes.  Since we parse the entire page, we need to stop the TableOfContents
> plugin being re-executed recursively.  This has the side-effect of allowing
> only one ToC per page.


Janne,

Returning the plain string "tableofcontents.title" is not very userfriendly.

Why not returning something more usefull, like an in-page link to the
actual 'first' rendered toc ?


dirk

Re: table of contents in the left menu?

Posted by Janne Jalkanen <Ja...@ecyrd.com>.
On Jun 26, 2008, at 23:38 , Dirk Frederickx wrote:

> Janne,
>
> Is there a reason why the TOC is only rendered the first time on a  
> page ?
>
>
> if( context.getVariable( VAR_ALREADY_PROCESSING ) != null )
>             return rb.getString("tableofcontents.title");

Yes.  Since we parse the entire page, we need to stop the  
TableOfContents plugin being re-executed recursively.  This has the  
side-effect of allowing only one ToC per page.

/Janne

Re: table of contents in the left menu?

Posted by Dirk Frederickx <di...@gmail.com>.
Janne,

Is there a reason why the TOC is only rendered the first time on a page ?


if( context.getVariable( VAR_ALREADY_PROCESSING ) != null )
            return rb.getString("tableofcontents.title");



dirk


On Thu, Jun 26, 2008 at 6:42 PM, Dirk Frederickx
<di...@gmail.com> wrote:
> Bob,
>
> Can you log this in JIRA.
>
> So I can improve the css to imrpvoe the style of toc's in left-menu's.
> This looks to me like a useful use-case.
>
>
> dirk
>
> On Thu, Jun 26, 2008 at 6:00 PM, Bob Paige <bo...@gmail.com> wrote:
>> Rather than remembering to put the [{TableOfContents}] plugin in every page
>> in my wiki, it occurred to me to put it in the LeftMenu page, but this
>> doesn't work so well. Has anyone else considered this, or come up with a
>> more graceful solution?
>>
>> When I put it in the LeftMenu, I doesn't display as well, and it still puts
>> a big "Table Of Contents" header on it even if there are no headings in the
>> page.
>>
>> Ideas?
>>
>> --
>> Bobman
>>
>

Re: table of contents in the left menu?

Posted by Harry Metske <ha...@gmail.com>.
https://issues.apache.org/jira/browse/JSPWIKI



2008/6/26 Bob Paige <bo...@gmail.com>:

> Can you give me a link? The only references to 'jira' I see on the jspwiki
> pages are for the plugin.
>
> --
> Bobman
>
> On Thu, Jun 26, 2008 at 12:42 PM, Dirk Frederickx <
> dirk.frederickx@gmail.com>
> wrote:
>
> > Bob,
> >
> > Can you log this in JIRA.
> >
> > So I can improve the css to imrpvoe the style of toc's in left-menu's.
> > This looks to me like a useful use-case.
> >
> >
> > dirk
> >
> > On Thu, Jun 26, 2008 at 6:00 PM, Bob Paige <bo...@gmail.com> wrote:
> > > Rather than remembering to put the [{TableOfContents}] plugin in every
> > page
> > > in my wiki, it occurred to me to put it in the LeftMenu page, but this
> > > doesn't work so well. Has anyone else considered this, or come up with
> a
> > > more graceful solution?
> > >
> > > When I put it in the LeftMenu, I doesn't display as well, and it still
> > puts
> > > a big "Table Of Contents" header on it even if there are no headings in
> > the
> > > page.
> > >
> > > Ideas?
> > >
> > > --
> > > Bobman
> > >
> >
>



-- 
met vriendelijke groet,
Harry Metske
Telnr. +31-548-512395
Mobile +31-6-51898081

Re: table of contents in the left menu?

Posted by Bob Paige <bo...@gmail.com>.
Can you give me a link? The only references to 'jira' I see on the jspwiki
pages are for the plugin.

-- 
Bobman

On Thu, Jun 26, 2008 at 12:42 PM, Dirk Frederickx <di...@gmail.com>
wrote:

> Bob,
>
> Can you log this in JIRA.
>
> So I can improve the css to imrpvoe the style of toc's in left-menu's.
> This looks to me like a useful use-case.
>
>
> dirk
>
> On Thu, Jun 26, 2008 at 6:00 PM, Bob Paige <bo...@gmail.com> wrote:
> > Rather than remembering to put the [{TableOfContents}] plugin in every
> page
> > in my wiki, it occurred to me to put it in the LeftMenu page, but this
> > doesn't work so well. Has anyone else considered this, or come up with a
> > more graceful solution?
> >
> > When I put it in the LeftMenu, I doesn't display as well, and it still
> puts
> > a big "Table Of Contents" header on it even if there are no headings in
> the
> > page.
> >
> > Ideas?
> >
> > --
> > Bobman
> >
>

Re: table of contents in the left menu?

Posted by Dirk Frederickx <di...@gmail.com>.
Bob,

Can you log this in JIRA.

So I can improve the css to imrpvoe the style of toc's in left-menu's.
This looks to me like a useful use-case.


dirk

On Thu, Jun 26, 2008 at 6:00 PM, Bob Paige <bo...@gmail.com> wrote:
> Rather than remembering to put the [{TableOfContents}] plugin in every page
> in my wiki, it occurred to me to put it in the LeftMenu page, but this
> doesn't work so well. Has anyone else considered this, or come up with a
> more graceful solution?
>
> When I put it in the LeftMenu, I doesn't display as well, and it still puts
> a big "Table Of Contents" header on it even if there are no headings in the
> page.
>
> Ideas?
>
> --
> Bobman
>