Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
[archived] mdp_SectionMenu
Notice: This thread is archived, there is a native txp tag now: <txp:section_list>.
**********************************************************
I wrote up this little plugin yesterday night, it takes all your section’s and output’s them as links to the highest level of that section (/section_name). Using wrap and break tags you can make them output as anything you want (div within a blockquote if you wanted!), and there are a few other options as well. Best example I can give is on my site, the menu you see on the side and top uses my plugin. Its default settings create’s an unordered list that include every section in alphabetical order.
Enjoy, post/email any comments or suggestions.
wow, the title of this thread got really messed up.
Last edited by greenrift (2004-06-15 22:53:48)
Offline
#2 2004-06-15 22:48:02
- slabanosa
- Member
- From: Silva Carbonaria
- Registered: 2004-06-01
- Posts: 57
Re: [archived] mdp_SectionMenu
http://greenrift.textdrive.com/ could not be found … ):
Offline
Re: [archived] mdp_SectionMenu
I know this may be inproper BB use, but I just wanted to say I left a topic for you (greenrift) here, and I couldn’t find any way to contact you through this or your site. Again, sorry for the irrelevent post.
Offline
#4 2004-06-17 14:31:17
- ryan
- New Member
- Registered: 2004-05-13
- Posts: 3
Re: [archived] mdp_SectionMenu
I installed this yesterday and it’s working like a charm. I made a hack on it to make the Home link functionality stop requiring the special “home” addition to the url. Basically, if it is rendering the special home item, it links to the site root.
Change the line:
$tagatts[] = ‘ href=”’.$pfr.$sval.’”’;
to the block:
if($sval != “home”) { $tagatts[] = ‘ href=”’.$pfr.$sval.’”’; } else { $tagatts[] = ‘ href=”/”’; }
Thanks for the great plugin!
Last edited by ryan (2004-06-17 14:32:18)
when you’re following an angel, does it mean you have to throw your body off a building? – tmbg
Offline
Re: [archived] mdp_SectionMenu
how is this any different than <code><txp:section_list /></code>
Refresh Dallas and other Refreshing Cities.
Offline
Re: [archived] mdp_SectionMenu
> tinyfly wrote:
> how is this any different than <code><txp:section_list /></code>
Section List will just output all of your sections in alphabetical order. It’s an all or nothing kind of thing. My plugin lets you rearrange the order, remove certain sections, and a link to your root directory. It’s section_list with some additional functionality.
Offline
Re: [archived] mdp_SectionMenu
Sounds Great! This is what I have been wanting for awhile now
Refresh Dallas and other Refreshing Cities.
Offline
#8 2004-06-25 15:00:12
- marco
- Member
- From: Montreal
- Registered: 2004-02-24
- Posts: 62
Re: [archived] mdp_SectionMenu
This is a nice plugin, I am wondering though:
- why do you use a “span” for each li in the generated html code? As far as I can see, a span is not needed there.
.
- how could I use an “id” option, instead of the “class” option?
Last edited by marco (2004-06-25 15:03:40)
Offline
#9 2004-06-25 15:24:22
- KidFiction
- New Member
- Registered: 2004-04-24
- Posts: 5
Re: [archived] mdp_SectionMenu
nice one! I was just using a linked list giving the sections their own catagory but no longer will I need to do that!
Offline
Re: [archived] mdp_SectionMenu
> marco wrote:
> This is a nice plugin, I am wondering though:
> why do you use a “span” for each li in the generated html code? As
> far as I can see, a span is not needed there.
I use the span tags around the text of the link so that if someone wanted to use FIR or similiar method they could.
> how could I use an “id” option, instead of the “class” option?
There is none currently, but you could edit the source (click on the plugin link, and edit it using the textarea) and where it says “$class = (!empty($atts[‘class’])…” replace the part following it ‘ class=”’.$atts[‘class’]’”’ with ‘ id=”’.$atts[‘class’].’”’ (make sure to include that space before “id”).
I’ll add a real ID option and post it up later today.
Offline
#11 2004-06-25 20:12:20
- marco
- Member
- From: Montreal
- Registered: 2004-02-24
- Posts: 62
Re: [archived] mdp_SectionMenu
> greenrift wrote:
> > marco wrote:
> This is a nice plugin, I am wondering though:
> why do you use a “span” for each li in the generated html code? As
> far as I can see, a span is not needed there.
I use the span tags around the text of the link so that if someone wanted to use FIR or similiar method they could.
> how could I use an “id” option, instead of the “class” option?
There is none currently, but you could edit the source (click on the plugin link, and edit it using the textarea) and where it says “$class = (!empty($atts[‘class’])…” replace the part following it ‘ class=”’.$atts[‘class’]’”’ with ‘ id=”’.$atts[‘class’].’”’ (make sure to include that space before “id”).
I’ll add a real ID option and post it up later today.
——-
Aha, that (the FIR) makes sense;
Thanks for adding the “ID” option.
Offline
Re: [archived] mdp_SectionMenu
Is anyone having trouble downloading this plug-in?
Offline