I'm trying to figure out whether Views can be used to create a FAQ in a way not supported by the FAQ module (http://drupal.org/project/faq). I've been able to build most of the pieces using Page and Attachment Views, but need guidance on whether and how I might link them via anchors.
Specifically, I'm trying to do this:
(1) Main FAQ Page (at /faq) - lists all FAQ entries in the narrative order I created them (they have a logical flow)
(2) Create Sub-FAQ pages per category (e.g. /faq/services)
(3) Auto-Create FAQ sub-menus (children of /faq) linked to the main navigation
For both #1 and #2, the style I like looks like a Table of Contents (TOC) - An ordered list of FAQ questions at the top of the page, followed by the list of Questions and Answers further down the page. The FAQ module provides such formatting, with hyperlinks from the ordered list of questions at the top to the anchor further down the page. Then, clicking on the Question Title at the anchor location links directly to the Node.
#2 would have the same style, but is filtered to only show the FAQ entries with the desired taxonomy term.
The FAQ module can't do this directly, which is why I'm trying to do it in Views. In FAQ, one can see either see the full list without the ability to filter by category, OR see a summary page (e.g. one line per category), with drill-down to a page which looks like #2.
Is it possible to use Views to create the following - a Table of Contents + detailed contents on the same page, linked by anchors? I was able to build the pieces (a TOC as an attachment above a Detailed Contents page). However, I couldn't see any way to create anchors on the Detailed Contents page, and have the TOC entries point to those anchors instead of directly to the node. Any suggestions?
Comments
Comment #1
tommytom commented+1
Comment #2
tommytom commenteddid you found out the answer ?
Comment #3
stacysimpson commentedSame issue. Has anyone figured this out?
Comment #4
stacysimpson commentedtw176, thread, http://drupal.org/node/313944, describes how to add HTML anchors to the detailed views output; however, I'm not sure what you mean by "a TOC as an attachment above a Detailed Contents page". How did you add this information?
Comment #5
stacysimpson commentedI found that Views Attachment module, but don't think that will help.?.? I was able to generate anchors for the node titles as suggested above; however, I don't see a clean method to autogenerate the HTML wikistyle table of contents. Looks like much of the code is already in the TableOfContents input filter and/or the FAQ module. Does anyone have any thoughts on how to cleanly generate this type of index on a per page basis within views?
Comment #6
stacysimpson commentedThis thread, http://drupal.org/node/329654, describes how to access some of the table of contents stuff; however, I haven't figured out how to integrate it with views content yet. Any thoughts or pointers?
Comment #7
stacysimpson commentedAnyone have any ideas for how to approach?
Comment #8
stacysimpson commentedWell, it turned out to be very straightforward...added the suggest magic in #6 to an overridden 'views-view--.tpl.php' theme.
Comment #9
stacysimpson commented