Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

  1. Index
  2. » Archives
  3. » [archived] mdp_SectionMenu

#25 2004-09-05 22:47:56

greenrift
Archived Plugin Author
Registered: 2004-03-08
Posts: 186
Website

Re: [archived] mdp_SectionMenu

hafnius: You could edit the code, but otherwise I didn’t include any switch.

On a side note, this will be buried under the noise but anyways, I won’t be able to do any updating or very much for about a week because my computer’s HD decided that this was the end. Data and stuff should still be recoverable, but I just can’t actually turn on my computer for fear of losing the ability to get any data off of it.

Offline

#26 2004-09-09 19:40:33

DrSlump
New Member
From: Spain
Registered: 2004-09-05
Posts: 3
Website

Re: [archived] mdp_SectionMenu

hi,

It’ll be usefull if we could tell the plugin to don’t show the current section.

That how I’m doing it:

————————

$noshow = explode(‘,’,$atts[‘noshow’]);

// new code <<<<

if ($atts[‘skipcurrent’] && $_GET[‘s’]) $noshow[] = $_GET[‘s’];

// >>>> end of new code

$sections = get_sections();

————————

however I’m almost sure the way I’m detecting the current section (using the URI) won’t work in many cases :(
I just started using Txp yesterday so I don’t yet know the innerworkings. Any help on this on will be welcome :)

ciao,
ivan

Last edited by DrSlump (2004-09-09 19:42:28)

Offline

#27 2004-09-09 21:41:03

obeewan
Archived Plugin Author
From: Stockholm, Sweden
Registered: 2004-08-12
Posts: 319
Website

Re: [archived] mdp_SectionMenu

DrSlump,

$_GET['s'] will only work in messy mode, not in clean. There is a global variable called $s that you can use or use the code $currentSection = gps('s') instead.

Last edited by obeewan (2004-09-09 21:41:15)


Plugins: ob1_advanced_search 1.032b, ob1_search_score 1.0, ob1_pagination 2.5, ob1_title 4.1, ob1_modified 2.1

“Let your plans be dark and as impenetratable as night, and when you move, fall like a thunderbolt.”
— Sun Tzu

Offline

#28 2004-09-10 06:57:28

DrSlump
New Member
From: Spain
Registered: 2004-09-05
Posts: 3
Website

Re: [archived] mdp_SectionMenu

thanks for the reply obeewan.

I’ve been looking at the source code and I think the solution is the $pretext global. $pretext[‘s’] returns the section even when reading an article with an url like index.php?id=3

ciao,
ivan

Offline

#29 2004-09-14 13:18:00

ray.williams
New Member
From: Warner Robins, GA
Registered: 2004-08-28
Posts: 5
Website

Re: [archived] mdp_SectionMenu

I’m not really sure how to change the code to be able put the section links in the order that I want. I’ve looked at the plugin code and read the bit on my installed plugins page, but I don’t know PHP at all so I’m lost.

Here’s what one of the options are:
<code>noshow=“comma seperated strings” This is a comma seperated list of sections you do not want to appear in the menu. Example “error,blog” would not display the \“error\” and \“blog\” sections.</code>

And here’s code from the plugin itself:
<code>$noshow = explode(‘,’,$atts[‘noshow’]);</code>

Will someone tell me where and what part of the code actually needs changing? Thanks.

Offline

#30 2004-09-14 13:39:33

Gabe
New Member
Registered: 2004-09-06
Posts: 5

Re: [archived] mdp_SectionMenu

noshow is for the ones you do not want on the page, and ordering is done with the ‘order’ attribute; so my section menu is <code> <txp:mdp_sectionmenu noshow=“article,author,main,results” order=“home,about,FAQ,database,copyrights” /></code>

which specifies those to eliminate and the correct order – no need to change the PHP code.

Offline

#31 2004-09-14 18:40:38

ray.williams
New Member
From: Warner Robins, GA
Registered: 2004-08-28
Posts: 5
Website

Re: [archived] mdp_SectionMenu

Ah! Thank you very much! I’m playing with the plugin now that I know how to use it. But I do have one more question: Can I get this plugin to list pages that are not a part of txp? If you look at my site, you’ll see a link called “Pictures”. It’s totally outside of txp, but I’d like it to be a part of the section list.

Offline

#32 2004-09-23 11:51:10

mattwebb
Member
From: Australia (but im in London)
Registered: 2004-06-16
Posts: 17
Website

Re: [archived] mdp_SectionMenu

Hey there !

Does anybody know what i am doing wrong with this ?? I am using the section menu… it works fine if i only apply the “id” option to it, but if i want to change the order, it only displays the “home” option and nothing else, no matter what i have in the order ???

Here is the tag i have put in the template..

txp:mdp_sectionmenu id=“nav” order=“home, contact”

Can anyone see what ive done wrong… i have mdp_lib installed and V0.3 of the plug in.

??

help please !

Matt

Last edited by mattwebb (2004-09-23 14:07:38)


Dont worry… The flash site is being re-developed with txp !

Offline

#33 2004-09-23 14:16:50

greenrift
Archived Plugin Author
Registered: 2004-03-08
Posts: 186
Website

Re: [archived] mdp_SectionMenu

> mattwebb wrote:

> Hey there !

> Does anybody know what i am doing wrong with this ?? I am using the section menu… it works fine if i only apply the “id” option to it, but if i want to change the order, it only displays the “home” option and nothing else, no matter what i have in the order ???

> Here is the tag i have put in the template..

> txp:mdp_sectionmenu id=“nav” order=“home, contact”

> Can anyone see what ive done wrong… i have mdp_lib installed and V0.3 of the plug in.

> ??

> help please !

> Matt

Try removing the space between the comma and the next section name. I’ll have to fix this sometime later.

Offline

#34 2004-09-23 14:36:04

mattwebb
Member
From: Australia (but im in London)
Registered: 2004-06-16
Posts: 17
Website

Re: [archived] mdp_SectionMenu

Still no go mate… ive tried every combination i can think of… it still shows nothing but the Homepage link… unless i remove “order”. :( boo hoo…

any other idea’s ??????


Dont worry… The flash site is being re-developed with txp !

Offline

#35 2004-09-23 14:41:41

hafnius
Archived Plugin Author
From: DK
Registered: 2004-09-02
Posts: 47

Re: [archived] mdp_SectionMenu

Hey Mattwebb

Have you tried taking out “Home” from the order?
/Hafnius


– Nobody puts Baby in the corner !
Johnny Castle, Dirty Dancing

Offline

#36 2004-09-23 15:25:45

mattwebb
Member
From: Australia (but im in London)
Registered: 2004-06-16
Posts: 17
Website

Re: [archived] mdp_SectionMenu

Taking “home” out just makes it render nothing at all ! :-O !

any other idea’s ??????


Dont worry… The flash site is being re-developed with txp !

Offline

  1. Index
  2. » Archives
  3. » [archived] mdp_SectionMenu

Board footer

Powered by FluxBB