Project

General

Profile

Actions

Patch #2010

closed

Wiki Sidebar: Adding a (navigational / TOC) section

Added by Christian Zuckschwerdt about 16 years ago. Updated almost 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Wiki
Target version:
-
Start date:
2008-10-08
Due date:
% Done:

30%

Estimated time:

Description

It would be nice if we could show a special page (if available) in the Wiki Sidebar section.
That way projects can display a list of hot links, a custom TOC or other infos on all wiki pages.
Maybe this can be generalized for other areas of redmine too.

Attached is a simple concept patch for r1928.


Files

redmine-r1928-sidebar.patch (888 Bytes) redmine-r1928-sidebar.patch Christian Zuckschwerdt, 2008-10-08 22:37
trac.png (145 KB) trac.png Ben Blanco, 2009-01-28 11:59
redmine.png (267 KB) redmine.png Ben Blanco, 2009-01-28 11:59
redmine-r2641-sidebar.patch (779 Bytes) redmine-r2641-sidebar.patch redmine-r2641-sidebar.patch Christian Zuckschwerdt, 2009-03-30 17:03

Related issues

Related to Redmine - Feature #5208: Aibility to edit wiki sidebarClosed2010-03-29

Actions
Actions #1

Updated by Christian Zuckschwerdt about 16 years ago

Sorry. This is not a defect. Is it possible to change this to "Feature Request"?

Actions #2

Updated by Jean-Philippe Lang about 16 years ago

  • Tracker changed from Defect to Patch
Actions #3

Updated by Ben Blanco almost 16 years ago

Hi Christian,

We're looking for the same feature/functionality. We switched over to redmine from trac where we used the TocMacro plugin.

It's really nice to have a native built-in TOC feature in redmine wiki pages - as well as the ability to have parent/child crumbs.

However, our users still get lost and are asking for easier navigation - ie. like we have before. Thus we'd like to be able to reinstate a global TOC for our projects' wikis in redmine. The TOC in trac was easy to edit, ie. just another wiki page using same wiki syntax -> it would be ideal to have something equally as simple in redmine, with added difference of being able to also list redmine default wiki views:
  • Index by title
  • Index by date

Here is what we had:

And how it'd be, aside from color-scheme:

Does your patch allow for this? Will it run on 0.8?

Thanks

Actions #4

Updated by Christian Zuckschwerdt almost 16 years ago

  • % Done changed from 0 to 30

Ben,

that's exactly my motivation. The patch provides that sidebar using a wiki page named 'Sidebar'. Did you try it? Perhaps the patch needs an update. It runs fine here and I'm still waiting for a general approval from the devs to make this a full-blown feature.

Actions #5

Updated by Ben Blanco almost 16 years ago

Hi Chris,

Thanks for the feedback - we should be giving this a spin tomorrow ;)

Actions #6

Updated by Ben Blanco almost 16 years ago

Hi Chris,

We put this in place, and Wow, what a night&day difference it's made for us. Thanks!

Ben

Actions #7

Updated by Vianney Lecroart almost 16 years ago

Hi Chris,

Thanks for this patch, really useful, I added it on my redmine!

Actions #8

Updated by Mischa The Evil over 15 years ago

Christian Zuckschwerdt wrote:

...The patch provides that sidebar using a wiki page named 'Sidebar'. Did you try it? Perhaps the patch needs an update. It runs fine here and I'm still waiting for a general approval from the devs to make this a full-blown feature...

This still works in the basics on the current trunk at r2641. One issue that comes up though are the section-links on headings which now points to the incorrect pages...

Actions #9

Updated by Christian Zuckschwerdt over 15 years ago

One issue that comes up though are the section-links on headings which now points to the incorrect pages...

Can you provide an example? In case you refer to the automatic anchors/links on headings, you can not have headings with exactly the same name in both content and sidebar.

Actions #10

Updated by Mischa The Evil over 15 years ago

Christian Zuckschwerdt wrote:

One issue that comes up though are the section-links on headings which now points to the incorrect pages...

Can you provide an example? In case you refer to the automatic anchors/links on headings, you can not have headings with exactly the same name in both content and sidebar.

That's exactly what I meant... The automatic anchors/links are pointing to the current page which breaks them and as a side-effect of that duplicates can occur (which will raise an error I guess).

Actions #11

Updated by Christian Zuckschwerdt over 15 years ago

Can you give a bit more detail? Say I put a "h3. Foobar" in the Sidebar. There will be an anchor #Foobar and a link to #Foobar on every page. No problem there, or am I missing something?
If you then put the same name Say "h1. Foobar" on some page you are in trouble. But content authors will always need to be careful there. I.e. you can't use "h1. Foobar" and say "h2. Foobar" on the same page anyhow.

Actions #12

Updated by Mischa The Evil over 15 years ago

Christian Zuckschwerdt wrote:

Can you give a bit more detail? Say I put a "h3. Foobar" in the Sidebar. There will be an anchor #Foobar and a link to #Foobar on every page. No problem there, or am I missing something?

This is the thing I see as a problem: The anchor/link #Foobar in your example is pointing to a non-existing section on the current page if no such heading is used in the current page...

Actions #13

Updated by Christian Zuckschwerdt over 15 years ago

The anchor/link #Foobar in your example is pointing to a non-existing section on the current page if no such heading is used in the current page...

Let clear this up some. That automatic link is pointing to the that same automatic anchor. I.e. when you add a heading "Foobar" it gets an id of "Foobar" serving as anchor for the link "#Foobar". It doesn't matter if this happens to be content or Sidebar. Did you experience otherwise? You can't use automatic links in the Sidebar to point to some content section.
Maybe you are talking about some manual links? Can you provide an example?

Actions #14

Updated by Mischa The Evil over 15 years ago

Christian Zuckschwerdt wrote:

Mischa The Evil wrote:

The anchor/link #Foobar in your example is pointing to a non-existing section on the current page if no such heading is used in the current page...

Let clear this up some. That automatic link is pointing to the that same automatic anchor. I.e. when you add a heading "Foobar" it gets an id of "Foobar" serving as anchor for the link "#Foobar". It doesn't matter if this happens to be content or Sidebar. Did you experience otherwise?

It does matter IMHO since this creates non-existent (automatically generated) anchor-links in the sidebar when using a sidebar-page.

For example with a Sidebar-page like following

h1. Sidebar

h2. Testers

* [[Test1]]
* [[Test2]]

h2. Others

* [[Other1]]
* [[Other2]]

my startpage (named Wiki) includes the Sidebar-page in the wiki-sidebar but this " partial " also includes automatically generated anchor-links on the headings (Testers and Others) pointing to these same anchors though on the current startpage (Wiki) which doesn't include headings (thus anchors) named Testers and Others.

Pff, seems difficult to explain but hope I made clear what I mean... :wink:

Christian Zuckschwerdt wrote:

You can't use automatic links in the Sidebar to point to some content section.

Agreed and acknowledged... Seems logical indeed ;-)

Actions #15

Updated by Christian Zuckschwerdt over 15 years ago

my startpage (named Wiki) includes the Sidebar-page in the wiki-sidebar but this " partial " also includes automatically generated anchor-links on the headings (Testers and Others) pointing to these same anchors though on the current startpage (Wiki) which doesn't include headings (thus anchors) named Testers and Others.

Ok, I see. But don't these automatic links point to just the headings in the Sidebar?

It seems you want the automatic links to point to content (which would be nice indeed).

Maybe the simple solution would be to remove automatic linking from Sidebar headings. It's just confusing and not that many people would want to link to a sidebar section anyway.

TODO:
  • remove automatic links from Sidebar headings
  • change Sidebar heading styles to match the existing Redmine sidebar items
  • Advise users to start with h3 in the Sidebar
Actions #16

Updated by Christian Zuckschwerdt over 15 years ago

TODO:
  • remove automatic links from Sidebar headings
  • change Sidebar heading styles to match the existing Redmine sidebar items
  • Advise users to start with h3 in the Sidebar

Here is an updated patch. The Sidebar css styles now match the original sidebar. It's intended for #2641.

Actions #17

Updated by Christian Zuckschwerdt over 15 years ago

Huh, where did the attachment go?

Actions #18

Updated by Mischa The Evil over 15 years ago

Christian Zuckschwerdt wrote:

Huh, where did the attachment go?

Hehe, I think it got lost due to our cuncurrent edit-actions I guess...

Christian Zuckschwerdt wrote:

...But don't these automatic links point to just the headings in the Sidebar?

AFAICT they don't... :-)

It seems you want the automatic links to point to content (which would be nice indeed).

I don't want and/or need it. I think it would make the implementation too difficult. I like your initial KISS-approach... :-)

Maybe the simple solution would be to remove automatic linking from Sidebar headings. It's just confusing and not that many people would want to link to a sidebar section anyway.

+10... This seems the best solution IMHO too...

Thanks for supporting this patch...

Kind regards,

Mischa.

Actions #20

Updated by Andy Wiltshire over 15 years ago

Is this still current?

I applied the latest patch to the latest version of redmine (15th June 09) and the sidebar intermittently disappears. As in, it 'kinda' works, then when you reload or go to another page, it disappears etc.

Any ideas?

Actions #21

Updated by Mischa The Evil over 15 years ago

Andy Wiltshire wrote:

Is this still current?

I applied the latest patch to the latest version of redmine (15th June 09) and the sidebar intermittently disappears. As in, it 'kinda' works, then when you reload or go to another page, it disappears etc.

Note sure about the current state of the patch but to be sure: have you actually created the Sidebar-wikipage as given in the instructions?:

The patch provides that sidebar using a wiki page named 'Sidebar'

Regards,

Mischa.

Actions #22

Updated by Jens Goldhammer over 15 years ago

+1 for integrating it into the trunk

Actions #23

Updated by Mischa The Evil over 15 years ago

Jens Goldhammer wrote:

+1 for integrating it into the trunk

This seems to be at least implemented as part of the Wiki Extensions plugin (thus you don't need to rely on core-modifications to get the desired feature).

Regards,

Mischa.

Actions #24

Updated by Jean-Philippe Lang over 14 years ago

  • Category set to Wiki
  • Status changed from New to Closed

Feature added in r3632.

Actions

Also available in: Atom PDF