Textpattern Forum

You are not logged in. Register | Login | Help

#21 2004-07-29 18:17:58

humanoid
Member
Registered: 2004-06-24
Posts: 17

Re: [archived] mdp_SectionMenu

Hi, I do not get any output from the plugin when I put

<code>
<txp:mdp_sectionmenu noshow=“home”/>
</code>

in my template.

I noted that the Example in the overview of the plugin also doesn’t contain any text. It says: Example and then nothing and two lines later it starts with Produces: and then the list Home, About etc.

Anything someone can think of I’s have to check? (BTW – yes, I uplaoded the mdp lib)

Thanks, Edwin

Offline

#22 2004-08-13 21:19:11

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

Re: [archived] mdp_SectionMenu

Since we are all dreaming up feats here is another I’d like to see (it works great as it is but …. :)

When I am in the category (for instance about) the id of the link should be menu_about_selected or simular meaning i can have the link look different when I am in that category ..

Love the FIR support (which I am using ;).

Cheers


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

#23 2004-09-05 00:46:40

spiffin
Plugin Author
From: London, UK
Registered: 2004-06-08
Posts: 79
Website

Re: [archived] mdp_SectionMenu

Hello

Anyone suggest a way of outputting this (custom section menu) as a popup rather than a list?

Thx

Offline

#24 2004-09-05 22:22:24

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

Re: [archived] mdp_SectionMenu

Hi all
Regarding the mdp_sectionmenu. I would like to not have all my menu items wrapped in SPAN. I can see that this can come in handy but i have no use for them – how can i turn them of?
/Klaus b


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

Offline

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

greenrift
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
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

Board footer

Powered by FluxBB