Postponed (maintainer needs more info)
Project:
Table of Contents
Version:
6.x-3.x-dev
Component:
User interface
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
29 Jul 2009 at 19:35 UTC
Updated:
10 Jan 2010 at 11:03 UTC
Comments
Comment #1
AlexisWilke commentedWell... TOC searches for H1 to H6 to generate the links.
Instead, you can add a header (i.e. H2) to your table titles (it is easy with the Rewrite feature).
Then it will add the TOC from that.
This is assuming you are using the insert_view module and that the filter for the TOC is after the insert_view.
Thank you.
Alexis Wilke
Comment #2
luco commentedthanks for the reply!
actually, I can't. I'm using tables as a style plugin and taxonomy terms as grouping fields. it automatically causes them (taxonomy terms) to be rendered as table captions and there's no rewrite for that. I could rewrite the _fields_, which go as table cells, but there's plenty of them for each table - and a single caption ;]
plus AFAIK you can't (or shouldn't) place block-level elements inside each other - both
<caption>and<h1>through<h6>are block-level.therefore your approach, even if possible, would create incorrect markup.
I'm sure you put a quite the lot of time in this module and I don't mean to cause you trouble. I'm just reporting a use case you might not have considered for a more complex situation. I'd be happy to patch the module if I spoke fluent PHP ;]
anyway, for the time being we'll just have to do without; but I hope you reconsider my suggestion in a future release.
cheers,
Luciano
Comment #3
AlexisWilke commentedLuciano,
Could you give me a link to your site?
Thank you.
Alexis Wilke
Comment #4
luco commentednot yet, unless I wanna get fired: there's a whole lot of non-disclosure around the project. ;]
once it's released, I'll be glad to show you.
a coworker edited the corresponding views TPL. now it outputs H3 inside table captions. he thinks I'm being too uptight about my XHTML. lol
Comment #5
AlexisWilke commentedI was just thinking that when I write a technical document for software projects, I often have tables and images (figures). And I like to have TOCs for those.
Is that would you are after? i.e. one TOC for the H1 to H6 entries, one TOC for tables (using captions) and one TOC for figures (using titles or the <caption> tag?)
Thank you.
Alexis
Comment #6
luco commentedactually there's a broader solution in modules like Cufón or Dynamic Rendering.
these replace common titles with flash and/or javascript for special fonts in your website.
in order for that to work, you tell the module: "I want H1.title, caption and #main .content h3 to be replaced with special fonts".
it's really not much more complicated than that.
you can install Cufón or Dynamic Rendering and check out its admin page, I think it's a great solution.
in this way, a ToC user could have exactly the titles he/she wants in the index. could be anything - table captions, images, subtitles, you name it. what do you think? feasible?
Comment #7
AlexisWilke commentedluco,
For the TOC to work, we need a name reference (<a name="some name">). That is used so the link in the TOC sends you to the item you choose.
I think that there are limits to what we can do because of that.
For instance, if I create a figure and I want the TOC to send me to the figure, I don't want to be send below where the caption is, but at the top of the figure. These are things to consider because I probably want the caption in the TOC...
Now, I'm not too sure about Cufón and DR, they look interesting, but that's a quite different type of module.
One day, I think I will add support for classes. That way you could say: "TOC all 'figure' classes." I don't see the point of supporting identifiers since each identifier is to be unique so you'd have to specify all of them in the TOC!? Why not add a class to all of those items?!
Thank you.
Alexis
Comment #8
luco commentedyes, you're right: that would create a ToC with every ID on the page listed. not nice.
but the classes idea could fly, especially if we can add levels for indexing.
eg "first-level", "second-level" and so on:
- first-level
- first-level
- second-level
- second-level
- second-level
- first-level
- first-level
as for captions, they're really the only way to group tables in views, and you can't add classes to that - unless we edit their TPL. I've checked the views interface over and over, there's no two ways about it.
Comment #9
zoo commentedI was just looking for this feature in TOC about indexing views table captions.
Thank You for working on it... I would help if I known php!
Bye
zoo
Comment #10
AlexisWilke commentedWould the TOC for tables be a separate TOC?
Comment #11
zoo commentedHello AlexisWilke,
No, the TOC should be one for all table captions...
zoo
Comment #12
AlexisWilke commentedHi Zoo,
I guess you did not understand the question... I meant, should we have one TOC for anchors, one TOC for tables and one TOC for figures (images)?
I think that would make sense.
Thank you.
Alexis
Comment #13
zoo commentedHello AlexisWilke,
Yes, I would say a unique ToC could be enough.
Then, whether or not to exclude/include those tags (captions, anchors, headers, images), could be an admin feature.
Also giving to users the possibility to choose their options exposed in a form within/close the ToC in the pages, would be a great feature too, in my opinion.
Does this make sense to you?
Thanks
Bye
zoo