Menu that links to specific content

View: New views
10 Messages — Rating Filter:   Alert me  

Menu that links to specific content

by MarvinC :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

My apologies in advance if this isn't a "hack request" but I'm in need of a
way to create a menu containing links that point to specific content on a
page. The content on most of the pages on a client site is long so what they
request is the ability for the user to click to be taken to a specific area
of the page, like so:
Link 1: Overview
Link 2: History
Link 3: Middle of Page
Link 4: Last Paragraph of Page

I have the FlexiPages plugin but it doesn't seem to allow this. Is there any
way to do this in Wordpress? Maybe what I'm asking isn't specific to WP so
maybe I can pointed in the right direction as my Google searching isn't
returning anything useful.
Again my apologies in advance if this doesn't fit. Therefore any responses
appreciated.
_______________________________________________
wp-hackers mailing list
wp-hackers@...
http://lists.automattic.com/mailman/listinfo/wp-hackers

Re: Menu that links to specific content

by Simon Blackbourn :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

2009/10/29 MarvinC <marvinc@...>

> My apologies in advance if this isn't a "hack request" but I'm in need of a
> way to create a menu containing links that point to specific content on a
> page. The content on most of the pages on a client site is long so what
> they
> request is the ability for the user to click to be taken to a specific area
> of the page, like so:
> Link 1: Overview
> Link 2: History
> Link 3: Middle of Page
> Link 4: Last Paragraph of Page
>
>
http://hackadelic.com/solutions/wordpress/toc-boxes automatically generates
a 'table of contents' for a post/page from the headers (h1, h2, etc) in the
content.
_______________________________________________
wp-hackers mailing list
wp-hackers@...
http://lists.automattic.com/mailman/listinfo/wp-hackers

Re: Menu that links to specific content

by mccormicky :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

LINKS MENU:
<a href="#overview">Overview</a>
<a href="#history">History</a>
<a href="#middleofpage">Middle</a>
<a href="#last"> Last</a>


CONTENT w/ANCHOR links

<h3 id="overview">Overview</h3>
<h3 id="history">History</h3>
<p id="middleofpage">middle paragraph</p>
<p id="last">End of page</p>


On Thu, Oct 29, 2009 at 10:31 AM, Simon Blackbourn <piemanek@...>wrote:

> 2009/10/29 MarvinC <marvinc@...>
>
> > My apologies in advance if this isn't a "hack request" but I'm in need of
> a
> > way to create a menu containing links that point to specific content on a
> > page. The content on most of the pages on a client site is long so what
> > they
> > request is the ability for the user to click to be taken to a specific
> area
> > of the page, like so:
> > Link 1: Overview
> > Link 2: History
> > Link 3: Middle of Page
> > Link 4: Last Paragraph of Page
> >
> >
> http://hackadelic.com/solutions/wordpress/toc-boxes automatically
> generates
> a 'table of contents' for a post/page from the headers (h1, h2, etc) in the
> content.
> _______________________________________________
> wp-hackers mailing list
> wp-hackers@...
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>
_______________________________________________
wp-hackers mailing list
wp-hackers@...
http://lists.automattic.com/mailman/listinfo/wp-hackers

Re: Menu that links to specific content

by MarvinC :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

WOW! This gave errors once activated so I'll check the authors website.

Thanks

On Thu, Oct 29, 2009 at 10:31 AM, Simon Blackbourn <piemanek@...>wrote:

> 2009/10/29 MarvinC <marvinc@...>
>
> >d.
>


> My apologies in advance if this isn't a "hack request" but I'm in need of a
> > way to create a menu containing links that point to specific content on a
> > page. The content on most of the pages on a client site is long so what
> > they
> > request is the ability for the user to click to be taken to a specific
> area
> > of the page, like so:
> > Link 1: Overview
> > Link 2: History
> > Link 3: Middle of Page
> > Link 4: Last Paragraph of Page
> >
> >
> http://hackadelic.com/solutions/wordpress/toc-boxes automatically
> generates
> a 'table of contents' for a post/page from the headers (h1, h2, etc) in the
> content.
> _______________________________________________
> wp-hackers mailing list
> wp-hackers@...
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>
_______________________________________________
wp-hackers mailing list
wp-hackers@...
http://lists.automattic.com/mailman/listinfo/wp-hackers

Re: Menu that links to specific content

by MarvinC :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I understand this may be considered OT to the list but I'm "not getting it".
Is there any way to clarify how this would work in Wordpress? Would I place
the code in the header.php file? It looks simple but since it's a first for
me I'm not seeing the big picture.
Any responses appreciated.

On Thu, Oct 29, 2009 at 9:56 AM, mccormicky <mccormicky@...> wrote:

> LINKS MENU:
> <a href="#overview">Overview</a>
> <a href="#history">History</a>
> <a href="#middleofpage">Middle</a>
> <a href="#last"> Last</a>
>
>
> CONTENT w/ANCHOR links
>
> <h3 id="overview">Overview</h3>
> <h3 id="history">History</h3>
> <p id="middleofpage">middle paragraph</p>
> <p id="last">End of page</p>
>
>
> On Thu, Oct 29, 2009 at 10:31 AM, Simon Blackbourn <piemanek@...
> >wrote:
>
> > 2009/10/29 MarvinC <marvinc@...>
> >
> > > My apologies in advance if this isn't a "hack request" but I'm in need
> of
> > a
> > > way to create a menu containing links that point to specific content on
> a
> > > page. The content on most of the pages on a client site is long so what
> > > they
> > > request is the ability for the user to click to be taken to a specific
> > area
> > > of the page, like so:
> > > Link 1: Overview
> > > Link 2: History
> > > Link 3: Middle of Page
> > > Link 4: Last Paragraph of Page
> > >
> > >
> > http://hackadelic.com/solutions/wordpress/toc-boxes automatically
> > generates
> > a 'table of contents' for a post/page from the headers (h1, h2, etc) in
> the
> > content.
> > _______________________________________________
> > wp-hackers mailing list
> > wp-hackers@...
> > http://lists.automattic.com/mailman/listinfo/wp-hackers
> >
> _______________________________________________
> wp-hackers mailing list
> wp-hackers@...
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>
_______________________________________________
wp-hackers mailing list
wp-hackers@...
http://lists.automattic.com/mailman/listinfo/wp-hackers

Re: Menu that links to specific content

by Jason Benesch :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

In your header.php add this menu:

<ul id="menu">
<li><a href="#overview">Overview></a></li>
<li><a href="#history">History</a></li>
<li><a href="#middleofpage">Middle</a></li>
<li><a href="#last"> Last</a></li>
</ul>

<style type="text/css">
#menu li { float:left; }
#menu li a { float:left; padding: 3px 8px; }
</style>



Then in your index.php file, or your archive.php file, or your page.php file
or any main body template file, add some more anchors:

<a name="overview">This is the overview section</a>
...... Stuff about the overview.......

<a name="history">This is the history section</a>
...... Stuff about the history.......



<a name="last">This is the last section</a>
...... Stuff about the last section of the page.......

On Tue, Nov 3, 2009 at 5:49 AM, MarvinC <marvinc@...> wrote:

> I understand this may be considered OT to the list but I'm "not getting
> it".
> Is there any way to clarify how this would work in Wordpress? Would I place
> the code in the header.php file? It looks simple but since it's a first for
> me I'm not seeing the big picture.
> Any responses appreciated.
>
> On Thu, Oct 29, 2009 at 9:56 AM, mccormicky <mccormicky@...> wrote:
>
> > LINKS MENU:
> > <a href="#overview">Overview</a>
> > <a href="#history">History</a>
> > <a href="#middleofpage">Middle</a>
> > <a href="#last"> Last</a>
> >
> >
> > CONTENT w/ANCHOR links
> >
> > <h3 id="overview">Overview</h3>
> > <h3 id="history">History</h3>
> > <p id="middleofpage">middle paragraph</p>
> > <p id="last">End of page</p>
> >
> >
> > On Thu, Oct 29, 2009 at 10:31 AM, Simon Blackbourn <piemanek@...
> > >wrote:
> >
> > > 2009/10/29 MarvinC <marvinc@...>
> > >
> > > > My apologies in advance if this isn't a "hack request" but I'm in
> need
> > of
> > > a
> > > > way to create a menu containing links that point to specific content
> on
> > a
> > > > page. The content on most of the pages on a client site is long so
> what
> > > > they
> > > > request is the ability for the user to click to be taken to a
> specific
> > > area
> > > > of the page, like so:
> > > > Link 1: Overview
> > > > Link 2: History
> > > > Link 3: Middle of Page
> > > > Link 4: Last Paragraph of Page
> > > >
> > > >
> > > http://hackadelic.com/solutions/wordpress/toc-boxes automatically
> > > generates
> > > a 'table of contents' for a post/page from the headers (h1, h2, etc) in
> > the
> > > content.
> > > _______________________________________________
> > > wp-hackers mailing list
> > > wp-hackers@...
> > > http://lists.automattic.com/mailman/listinfo/wp-hackers
> > >
> > _______________________________________________
> > wp-hackers mailing list
> > wp-hackers@...
> > http://lists.automattic.com/mailman/listinfo/wp-hackers
> >
> _______________________________________________
> wp-hackers mailing list
> wp-hackers@...
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>



--
Jason Benesch

Real Estate Tomato
Co-owner
www.realestatetomato.com
(619) 770-1950
jason@...

ListingPress
Owner, Founder
www.listingpress.com
(619) 955-7465
jason@...
_______________________________________________
wp-hackers mailing list
wp-hackers@...
http://lists.automattic.com/mailman/listinfo/wp-hackers

Re: Menu that links to specific content

by MarvinC :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thanks for the reply. SHould the CSS section be added to the style sheet?
I'm wondering how this would work in WP if I wanted to widgetize the TOC or
have the TOC to appear in a widget that only appears on select pages.

On Tue, Nov 3, 2009 at 12:18 PM, Jason Benesch
<jason@...>wrote:

> In your header.php add this menu:
>
> <ul id="menu">
> <li><a href="#overview">Overview></a></li>
> <li><a href="#history">History</a></li>
> <li><a href="#middleofpage">Middle</a></li>
> <li><a href="#last"> Last</a></li>
> </ul>
>
> <style type="text/css">
> #menu li { float:left; }
> #menu li a { float:left; padding: 3px 8px; }
> </style>
>
>
>
> Then in your index.php file, or your archive.php file, or your page.php
> file
> or any main body template file, add some more anchors:
>
> <a name="overview">This is the overview section</a>
> ...... Stuff about the overview.......
>
> <a name="history">This is the history section</a>
> ...... Stuff about the history.......
>
>
>
> <a name="last">This is the last section</a>
> ...... Stuff about the last section of the page.......
>
> On Tue, Nov 3, 2009 at 5:49 AM, MarvinC <marvinc@...> wrote:
>
> > I understand this may be considered OT to the list but I'm "not getting
> > it".
> > Is there any way to clarify how this would work in Wordpress? Would I
> place
> > the code in the header.php file? It looks simple but since it's a first
> for
> > me I'm not seeing the big picture.
> > Any responses appreciated.
> >
> > On Thu, Oct 29, 2009 at 9:56 AM, mccormicky <mccormicky@...>
> wrote:
> >
> > > LINKS MENU:
> > > <a href="#overview">Overview</a>
> > > <a href="#history">History</a>
> > > <a href="#middleofpage">Middle</a>
> > > <a href="#last"> Last</a>
> > >
> > >
> > > CONTENT w/ANCHOR links
> > >
> > > <h3 id="overview">Overview</h3>
> > > <h3 id="history">History</h3>
> > > <p id="middleofpage">middle paragraph</p>
> > > <p id="last">End of page</p>
> > >
> > >
> > > On Thu, Oct 29, 2009 at 10:31 AM, Simon Blackbourn <piemanek@...
> > > >wrote:
> > >
> > > > 2009/10/29 MarvinC <marvinc@...>
> > > >
> > > > > My apologies in advance if this isn't a "hack request" but I'm in
> > need
> > > of
> > > > a
> > > > > way to create a menu containing links that point to specific
> content
> > on
> > > a
> > > > > page. The content on most of the pages on a client site is long so
> > what
> > > > > they
> > > > > request is the ability for the user to click to be taken to a
> > specific
> > > > area
> > > > > of the page, like so:
> > > > > Link 1: Overview
> > > > > Link 2: History
> > > > > Link 3: Middle of Page
> > > > > Link 4: Last Paragraph of Page
> > > > >
> > > > >
> > > > http://hackadelic.com/solutions/wordpress/toc-boxes automatically
> > > > generates
> > > > a 'table of contents' for a post/page from the headers (h1, h2, etc)
> in
> > > the
> > > > content.
> > > > _______________________________________________
> > > > wp-hackers mailing list
> > > > wp-hackers@...
> > > > http://lists.automattic.com/mailman/listinfo/wp-hackers
> > > >
> > > _______________________________________________
> > > wp-hackers mailing list
> > > wp-hackers@...
> > > http://lists.automattic.com/mailman/listinfo/wp-hackers
> > >
> > _______________________________________________
> > wp-hackers mailing list
> > wp-hackers@...
> > http://lists.automattic.com/mailman/listinfo/wp-hackers
> >
>
>
>
> --
> Jason Benesch
>
> Real Estate Tomato
> Co-owner
> www.realestatetomato.com
> (619) 770-1950
> jason@...
>
> ListingPress
> Owner, Founder
> www.listingpress.com
> (619) 955-7465
> jason@...
> _______________________________________________
> wp-hackers mailing list
> wp-hackers@...
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>
_______________________________________________
wp-hackers mailing list
wp-hackers@...
http://lists.automattic.com/mailman/listinfo/wp-hackers

Re: Menu that links to specific content

by mccormicky :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

As long as the ids of the TOC are unique go ahead and place the new CSS to
style the TOC menu in the main WP stylesheet
You could make a separate stylesheet for the TOC menu but some people frown
on too many external stylesheets (tho'  it is lightweight enough not to
matter really either way).

As for including the TOC menu in only certain pages you could make special
page templates and include the TOC just like you'd include a sidebar

<?php /*
Template Name:Special Page Template
*/ ?>
<?php get_header();?>

<?php include (TEMPLATEPATH . "/toc.php"); ?>

etc

?>


On Tue, Nov 3, 2009 at 12:33 PM, MarvinC <marvinc@...> wrote:

> Thanks for the reply. SHould the CSS section be added to the style sheet?
> I'm wondering how this would work in WP if I wanted to widgetize the TOC or
> have the TOC to appear in a widget that only appears on select pages.
>
> On Tue, Nov 3, 2009 at 12:18 PM, Jason Benesch
> <jason@...>wrote:
>
> > In your header.php add this menu:
> >
> > <ul id="menu">
> > <li><a href="#overview">Overview></a></li>
> > <li><a href="#history">History</a></li>
> > <li><a href="#middleofpage">Middle</a></li>
> > <li><a href="#last"> Last</a></li>
> > </ul>
> >
> > <style type="text/css">
> > #menu li { float:left; }
> > #menu li a { float:left; padding: 3px 8px; }
> > </style>
> >
> >
> >
> > Then in your index.php file, or your archive.php file, or your page.php
> > file
> > or any main body template file, add some more anchors:
> >
> > <a name="overview">This is the overview section</a>
> > ...... Stuff about the overview.......
> >
> > <a name="history">This is the history section</a>
> > ...... Stuff about the history.......
> >
> >
> >
> > <a name="last">This is the last section</a>
> > ...... Stuff about the last section of the page.......
> >
> > On Tue, Nov 3, 2009 at 5:49 AM, MarvinC <marvinc@...> wrote:
> >
> > > I understand this may be considered OT to the list but I'm "not getting
> > > it".
> > > Is there any way to clarify how this would work in Wordpress? Would I
> > place
> > > the code in the header.php file? It looks simple but since it's a first
> > for
> > > me I'm not seeing the big picture.
> > > Any responses appreciated.
> > >
> > > On Thu, Oct 29, 2009 at 9:56 AM, mccormicky <mccormicky@...>
> > wrote:
> > >
> > > > LINKS MENU:
> > > > <a href="#overview">Overview</a>
> > > > <a href="#history">History</a>
> > > > <a href="#middleofpage">Middle</a>
> > > > <a href="#last"> Last</a>
> > > >
> > > >
> > > > CONTENT w/ANCHOR links
> > > >
> > > > <h3 id="overview">Overview</h3>
> > > > <h3 id="history">History</h3>
> > > > <p id="middleofpage">middle paragraph</p>
> > > > <p id="last">End of page</p>
> > > >
> > > >
> > > > On Thu, Oct 29, 2009 at 10:31 AM, Simon Blackbourn <
> piemanek@...
> > > > >wrote:
> > > >
> > > > > 2009/10/29 MarvinC <marvinc@...>
> > > > >
> > > > > > My apologies in advance if this isn't a "hack request" but I'm in
> > > need
> > > > of
> > > > > a
> > > > > > way to create a menu containing links that point to specific
> > content
> > > on
> > > > a
> > > > > > page. The content on most of the pages on a client site is long
> so
> > > what
> > > > > > they
> > > > > > request is the ability for the user to click to be taken to a
> > > specific
> > > > > area
> > > > > > of the page, like so:
> > > > > > Link 1: Overview
> > > > > > Link 2: History
> > > > > > Link 3: Middle of Page
> > > > > > Link 4: Last Paragraph of Page
> > > > > >
> > > > > >
> > > > > http://hackadelic.com/solutions/wordpress/toc-boxes automatically
> > > > > generates
> > > > > a 'table of contents' for a post/page from the headers (h1, h2,
> etc)
> > in
> > > > the
> > > > > content.
> > > > > _______________________________________________
> > > > > wp-hackers mailing list
> > > > > wp-hackers@...
> > > > > http://lists.automattic.com/mailman/listinfo/wp-hackers
> > > > >
> > > > _______________________________________________
> > > > wp-hackers mailing list
> > > > wp-hackers@...
> > > > http://lists.automattic.com/mailman/listinfo/wp-hackers
> > > >
> > > _______________________________________________
> > > wp-hackers mailing list
> > > wp-hackers@...
> > > http://lists.automattic.com/mailman/listinfo/wp-hackers
> > >
> >
> >
> >
> > --
> > Jason Benesch
> >
> > Real Estate Tomato
> > Co-owner
> > www.realestatetomato.com
> > (619) 770-1950
> > jason@...
> >
> > ListingPress
> > Owner, Founder
> > www.listingpress.com
> > (619) 955-7465
> > jason@...
> > _______________________________________________
> > wp-hackers mailing list
> > wp-hackers@...
> > http://lists.automattic.com/mailman/listinfo/wp-hackers
> >
> _______________________________________________
> wp-hackers mailing list
> wp-hackers@...
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>
_______________________________________________
wp-hackers mailing list
wp-hackers@...
http://lists.automattic.com/mailman/listinfo/wp-hackers

Re: Menu that links to specific content

by MarvinC :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Don't mean to seem scattered but I came across the WP-TOC plugin which works
in that it detects the Headings and displays a TOC based upon the [toc]
short-code. The problem is that it only works when placed on the page. So
image a really long page with a narrow width and a TOC box sitting in it. I
don't see anything in the Readme that states it can be used as a widget so
I've fired off an email to the author to confirm.

I would like to have a specific page template and tried to create a new
template file but think I may have done something wrong. Here are my steps:
1. Create new file: Test.php
2. Get errors after adding the following code to the beginning of the file:

<?php /*
Template Name:Test
*/ ?>
<?php get_header();?>

<?php include (TEMPLATEPATH . "/toc.php"); ?> or <?php include (TEMPLATEPATH
. "/wp-toc.php"); ?>

?>

Am I missing the obvious?

tia


On Tue, Nov 3, 2009 at 12:47 PM, mccormicky <mccormicky@...> wrote:

> As long as the ids of the TOC are unique go ahead and place the new CSS to
> style the TOC menu in the main WP stylesheet
> You could make a separate stylesheet for the TOC menu but some people frown
> on too many external stylesheets (tho'  it is lightweight enough not to
> matter really either way).
>
> As for including the TOC menu in only certain pages you could make special
> page templates and include the TOC just like you'd include a sidebar
>
> <?php /*
> Template Name:Special Page Template
> */ ?>
> <?php get_header();?>
>
> <?php include (TEMPLATEPATH . "/toc.php"); ?>
>
> etc
>
> ?>
>
>
> On Tue, Nov 3, 2009 at 12:33 PM, MarvinC <marvinc@...> wrote:
>
> > Thanks for the reply. SHould the CSS section be added to the style sheet?
> > I'm wondering how this would work in WP if I wanted to widgetize the TOC
> or
> > have the TOC to appear in a widget that only appears on select pages.
> >
> > On Tue, Nov 3, 2009 at 12:18 PM, Jason Benesch
> > <jason@...>wrote:
> >
> > > In your header.php add this menu:
> > >
> > > <ul id="menu">
> > > <li><a href="#overview">Overview></a></li>
> > > <li><a href="#history">History</a></li>
> > > <li><a href="#middleofpage">Middle</a></li>
> > > <li><a href="#last"> Last</a></li>
> > > </ul>
> > >
> > > <style type="text/css">
> > > #menu li { float:left; }
> > > #menu li a { float:left; padding: 3px 8px; }
> > > </style>
> > >
> > >
> > >
> > > Then in your index.php file, or your archive.php file, or your page.php
> > > file
> > > or any main body template file, add some more anchors:
> > >
> > > <a name="overview">This is the overview section</a>
> > > ...... Stuff about the overview.......
> > >
> > > <a name="history">This is the history section</a>
> > > ...... Stuff about the history.......
> > >
> > >
> > >
> > > <a name="last">This is the last section</a>
> > > ...... Stuff about the last section of the page.......
> > >
> > > On Tue, Nov 3, 2009 at 5:49 AM, MarvinC <marvinc@...> wrote:
> > >
> > > > I understand this may be considered OT to the list but I'm "not
> getting
> > > > it".
> > > > Is there any way to clarify how this would work in Wordpress? Would I
> > > place
> > > > the code in the header.php file? It looks simple but since it's a
> first
> > > for
> > > > me I'm not seeing the big picture.
> > > > Any responses appreciated.
> > > >
> > > > On Thu, Oct 29, 2009 at 9:56 AM, mccormicky <mccormicky@...>
> > > wrote:
> > > >
> > > > > LINKS MENU:
> > > > > <a href="#overview">Overview</a>
> > > > > <a href="#history">History</a>
> > > > > <a href="#middleofpage">Middle</a>
> > > > > <a href="#last"> Last</a>
> > > > >
> > > > >
> > > > > CONTENT w/ANCHOR links
> > > > >
> > > > > <h3 id="overview">Overview</h3>
> > > > > <h3 id="history">History</h3>
> > > > > <p id="middleofpage">middle paragraph</p>
> > > > > <p id="last">End of page</p>
> > > > >
> > > > >
> > > > > On Thu, Oct 29, 2009 at 10:31 AM, Simon Blackbourn <
> > piemanek@...
> > > > > >wrote:
> > > > >
> > > > > > 2009/10/29 MarvinC <marvinc@...>
> > > > > >
> > > > > > > My apologies in advance if this isn't a "hack request" but I'm
> in
> > > > need
> > > > > of
> > > > > > a
> > > > > > > way to create a menu containing links that point to specific
> > > content
> > > > on
> > > > > a
> > > > > > > page. The content on most of the pages on a client site is long
> > so
> > > > what
> > > > > > > they
> > > > > > > request is the ability for the user to click to be taken to a
> > > > specific
> > > > > > area
> > > > > > > of the page, like so:
> > > > > > > Link 1: Overview
> > > > > > > Link 2: History
> > > > > > > Link 3: Middle of Page
> > > > > > > Link 4: Last Paragraph of Page
> > > > > > >
> > > > > > >
> > > > > > http://hackadelic.com/solutions/wordpress/toc-boxesautomatically
> > > > > > generates
> > > > > > a 'table of contents' for a post/page from the headers (h1, h2,
> > etc)
> > > in
> > > > > the
> > > > > > content.
> > > > > > _______________________________________________
> > > > > > wp-hackers mailing list
> > > > > > wp-hackers@...
> > > > > > http://lists.automattic.com/mailman/listinfo/wp-hackers
> > > > > >
> > > > > _______________________________________________
> > > > > wp-hackers mailing list
> > > > > wp-hackers@...
> > > > > http://lists.automattic.com/mailman/listinfo/wp-hackers
> > > > >
> > > > _______________________________________________
> > > > wp-hackers mailing list
> > > > wp-hackers@...
> > > > http://lists.automattic.com/mailman/listinfo/wp-hackers
> > > >
> > >
> > >
> > >
> > > --
> > > Jason Benesch
> > >
> > > Real Estate Tomato
> > > Co-owner
> > > www.realestatetomato.com
> > > (619) 770-1950
> > > jason@...
> > >
> > > ListingPress
> > > Owner, Founder
> > > www.listingpress.com
> > > (619) 955-7465
> > > jason@...
> > > _______________________________________________
> > > wp-hackers mailing list
> > > wp-hackers@...
> > > http://lists.automattic.com/mailman/listinfo/wp-hackers
> > >
> > _______________________________________________
> > wp-hackers mailing list
> > wp-hackers@...
> > http://lists.automattic.com/mailman/listinfo/wp-hackers
> >
> _______________________________________________
> wp-hackers mailing list
> wp-hackers@...
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>
_______________________________________________
wp-hackers mailing list
wp-hackers@...
http://lists.automattic.com/mailman/listinfo/wp-hackers

Re: Menu that links to specific content

by mccormicky :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hope I am not confusing you more, then!


 do you want the menu In a sidebar


If you use this code you can use a shortcode for the wpTOC plugin in a
sidebar textwidget
add_filter('widget_text', 'do_shortcode');

but you have to paste it in functions.php and be careful to paste it
between the opening
<?php
and closing
?>

My laste code snippet might have had some bad " in it.






On Tue, Nov 3, 2009 at 1:37 PM, MarvinC <marvinc@...> wrote:

>
> Don't mean to seem scattered but I came across the WP-TOC plugin which works
> in that it detects the Headings and displays a TOC based upon the [toc]
> short-code. The problem is that it only works when placed on the page. So
> image a really long page with a narrow width and a TOC box sitting in it. I
> don't see anything in the Readme that states it can be used as a widget so
> I've fired off an email to the author to confirm.
>
> I would like to have a specific page template and tried to create a new
> template file but think I may have done something wrong. Here are my steps:
> 1. Create new file: Test.php
> 2. Get errors after adding the following code to the beginning of the file:
>
> <?php /*
> Template Name:Test
> */ ?>
> <?php get_header();?>
>
> <?php include (TEMPLATEPATH . "/toc.php"); ?> or <?php include (TEMPLATEPATH
> . "/wp-toc.php"); ?>
>
> ?>
>
> Am I missing the obvious?
>
> tia
>
>
> On Tue, Nov 3, 2009 at 12:47 PM, mccormicky <mccormicky@...> wrote:
>
> > As long as the ids of the TOC are unique go ahead and place the new CSS to
> > style the TOC menu in the main WP stylesheet
> > You could make a separate stylesheet for the TOC menu but some people frown
> > on too many external stylesheets (tho'  it is lightweight enough not to
> > matter really either way).
> >
> > As for including the TOC menu in only certain pages you could make special
> > page templates and include the TOC just like you'd include a sidebar
> >
> > <?php /*
> > Template Name:Special Page Template
> > */ ?>
> > <?php get_header();?>
> >
> > <?php include (TEMPLATEPATH . "/toc.php"); ?>
> >
> > etc
> >
> > ?>
> >
> >
> > On Tue, Nov 3, 2009 at 12:33 PM, MarvinC <marvinc@...> wrote:
> >
> > > Thanks for the reply. SHould the CSS section be added to the style sheet?
> > > I'm wondering how this would work in WP if I wanted to widgetize the TOC
> > or
> > > have the TOC to appear in a widget that only appears on select pages.
> > >
> > > On Tue, Nov 3, 2009 at 12:18 PM, Jason Benesch
> > > <jason@...>wrote:
> > >
> > > > In your header.php add this menu:
> > > >
> > > > <ul id="menu">
> > > > <li><a href="#overview">Overview></a></li>
> > > > <li><a href="#history">History</a></li>
> > > > <li><a href="#middleofpage">Middle</a></li>
> > > > <li><a href="#last"> Last</a></li>
> > > > </ul>
> > > >
> > > > <style type="text/css">
> > > > #menu li { float:left; }
> > > > #menu li a { float:left; padding: 3px 8px; }
> > > > </style>
> > > >
> > > >
> > > >
> > > > Then in your index.php file, or your archive.php file, or your page.php
> > > > file
> > > > or any main body template file, add some more anchors:
> > > >
> > > > <a name="overview">This is the overview section</a>
> > > > ...... Stuff about the overview.......
> > > >
> > > > <a name="history">This is the history section</a>
> > > > ...... Stuff about the history.......
> > > >
> > > >
> > > >
> > > > <a name="last">This is the last section</a>
> > > > ...... Stuff about the last section of the page.......
> > > >
> > > > On Tue, Nov 3, 2009 at 5:49 AM, MarvinC <marvinc@...> wrote:
> > > >
> > > > > I understand this may be considered OT to the list but I'm "not
> > getting
> > > > > it".
> > > > > Is there any way to clarify how this would work in Wordpress? Would I
> > > > place
> > > > > the code in the header.php file? It looks simple but since it's a
> > first
> > > > for
> > > > > me I'm not seeing the big picture.
> > > > > Any responses appreciated.
> > > > >
> > > > > On Thu, Oct 29, 2009 at 9:56 AM, mccormicky <mccormicky@...>
> > > > wrote:
> > > > >
> > > > > > LINKS MENU:
> > > > > > <a href="#overview">Overview</a>
> > > > > > <a href="#history">History</a>
> > > > > > <a href="#middleofpage">Middle</a>
> > > > > > <a href="#last"> Last</a>
> > > > > >
> > > > > >
> > > > > > CONTENT w/ANCHOR links
> > > > > >
> > > > > > <h3 id="overview">Overview</h3>
> > > > > > <h3 id="history">History</h3>
> > > > > > <p id="middleofpage">middle paragraph</p>
> > > > > > <p id="last">End of page</p>
> > > > > >
> > > > > >
> > > > > > On Thu, Oct 29, 2009 at 10:31 AM, Simon Blackbourn <
> > > piemanek@...
> > > > > > >wrote:
> > > > > >
> > > > > > > 2009/10/29 MarvinC <marvinc@...>
> > > > > > >
> > > > > > > > My apologies in advance if this isn't a "hack request" but I'm
> > in
> > > > > need
> > > > > > of
> > > > > > > a
> > > > > > > > way to create a menu containing links that point to specific
> > > > content
> > > > > on
> > > > > > a
> > > > > > > > page. The content on most of the pages on a client site is long
> > > so
> > > > > what
> > > > > > > > they
> > > > > > > > request is the ability for the user to click to be taken to a
> > > > > specific
> > > > > > > area
> > > > > > > > of the page, like so:
> > > > > > > > Link 1: Overview
> > > > > > > > Link 2: History
> > > > > > > > Link 3: Middle of Page
> > > > > > > > Link 4: Last Paragraph of Page
> > > > > > > >
> > > > > > > >
> > > > > > > http://hackadelic.com/solutions/wordpress/toc-boxesautomatically
> > > > > > > generates
> > > > > > > a 'table of contents' for a post/page from the headers (h1, h2,
> > > etc)
> > > > in
> > > > > > the
> > > > > > > content.
> > > > > > > _______________________________________________
> > > > > > > wp-hackers mailing list
> > > > > > > wp-hackers@...
> > > > > > > http://lists.automattic.com/mailman/listinfo/wp-hackers
> > > > > > >
> > > > > > _______________________________________________
> > > > > > wp-hackers mailing list
> > > > > > wp-hackers@...
> > > > > > http://lists.automattic.com/mailman/listinfo/wp-hackers
> > > > > >
> > > > > _______________________________________________
> > > > > wp-hackers mailing list
> > > > > wp-hackers@...
> > > > > http://lists.automattic.com/mailman/listinfo/wp-hackers
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > Jason Benesch
> > > >
> > > > Real Estate Tomato
> > > > Co-owner
> > > > www.realestatetomato.com
> > > > (619) 770-1950
> > > > jason@...
> > > >
> > > > ListingPress
> > > > Owner, Founder
> > > > www.listingpress.com
> > > > (619) 955-7465
> > > > jason@...
> > > > _______________________________________________
> > > > wp-hackers mailing list
> > > > wp-hackers@...
> > > > http://lists.automattic.com/mailman/listinfo/wp-hackers
> > > >
> > > _______________________________________________
> > > wp-hackers mailing list
> > > wp-hackers@...
> > > http://lists.automattic.com/mailman/listinfo/wp-hackers
> > >
> > _______________________________________________
> > wp-hackers mailing list
> > wp-hackers@...
> > http://lists.automattic.com/mailman/listinfo/wp-hackers
> >
> _______________________________________________
> wp-hackers mailing list
> wp-hackers@...
> http://lists.automattic.com/mailman/listinfo/wp-hackers
_______________________________________________
wp-hackers mailing list
wp-hackers@...
http://lists.automattic.com/mailman/listinfo/wp-hackers