Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

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

#49 2005-02-11 13:50:21

NikLP
Member
From: Nottingham
Registered: 2005-02-01
Posts: 43
Website

Re: [archived] mdp_SectionMenu

God damn it, it was default instead of home.
I’m sure the docs said home?
Oh well. I will reorder them now anyway as suggested above :)
I was going to do that anyway, but I couldn’t let it lie without fixing that problem!

Edit: Weird. I took out the noshow attribute and replaced it with the order attribute, and the Home link reappeared; I have had to put the noshow back in?! Also, the order attribute did not work at all?

< txp:mdp_sectionmenu order=

Last edited by NikLP (2005-02-11 13:55:20)

Offline

#50 2005-02-11 15:39:57

swf
Plugin Author
From: Saskatoon, Saskatchewan Canada
Registered: 2004-06-21
Posts: 109
Website

Re: [archived] mdp_SectionMenu

I haven’t used this plugin but you should be able to include both the noshow and order attributes. You shouldn’t have to remove one of them

Offline

#51 2005-02-11 16:08:02

andjules
Member
From: toronto
Registered: 2004-10-20
Posts: 44

Re: [archived] mdp_SectionMenu

assuming they are valid section names, your code looks identical to mine… not sure why order= is giving you trouble.

Offline

#52 2005-02-11 16:13:35

NikLP
Member
From: Nottingham
Registered: 2005-02-01
Posts: 43
Website

Re: [archived] mdp_SectionMenu

Well, I’m lost.
noshow=“default” removes the section list entry for ‘home’ (not sure why though?)
order=”“ – well I’ve tried it with and without noshow, with and without spaces after commas, and nothing seems to work…

Perhaps I should mention that as this is a test site I’m also running in a subdirectory? Clean urls on, can’t think of anything else.

Last edited by NikLP (2005-02-11 16:15:54)

Offline

#53 2005-02-11 16:19:56

andjules
Member
From: toronto
Registered: 2004-10-20
Posts: 44

Re: [archived] mdp_SectionMenu

yeah i’m in a subdirectory too
not sure what’s up
but come to think of it, i did make some mods to the code, as listed a few posts back up this thread. none of the mods were directed at this issue, but maybe something i did is part of the different result?

Offline

#54 2005-02-11 16:22:44

NikLP
Member
From: Nottingham
Registered: 2005-02-01
Posts: 43
Website

Re: [archived] mdp_SectionMenu

Bah!!
>screw up<
>dropkick<

I’ll try again later.

Last edited by NikLP (2005-02-11 16:23:14)

Offline

#55 2005-02-20 19:42:25

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,596
Website

Re: [archived] mdp_SectionMenu

Hallo greenrift,

testing on a new install of RC3 mdp_sectionmenu no longer returns the correct URL links for the menu. I think I have tracked it down to the lack of the “subdirectory” field in the admin prefs and deprecation of $pfr/$path_from_root in v1.0. An existing install may possibly continue to work but a new install has no value for $pfr and so produces incorrect URL results which lack the subdirectory offset.

I tried it with $siteurl instead of §pfr but the urls for menus in sections are then incorrect.

I also have a request:

I have been using de/ and en/ (could also be de_ or en_) as prefixes in section names for a bilingual setup. It would be ideal to have a “strip” string attribute which one could denote to be removed from the display name of the sections (i.e. strip=“de/” to remove all “de/” out of the displayed section names).

I have tweaked your code as suggested earlier in the thread to change – and _ into a space and that works fine. Urlencoding or “dumbDown” as it now seems to be called in the source I have not managed to get working to convert german umlauts and double-s in the urls and display names.

The combination of these two would make the plug-in stumble proof for international usage and remain dynamic without the in my view less elegant manual recreation required for section_alias.

thanks for considering my suggestions,

jakob

Last edited by jakob (2005-02-20 19:44:03)


TXP Builders – finely-crafted code, design and txp

Offline

#56 2005-02-20 20:25:29

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,596
Website

Re: [archived] mdp_SectionMenu

got a little further: changing this line seemed to help:

<pre>
$tagatts[] = ($sect == ‘default’) ? ‘ href=”’.hu.’”’ : ‘ href=”’.hu.$sect.’”’; // ryan’s addition
</pre>


TXP Builders – finely-crafted code, design and txp

Offline

#57 2005-08-03 17:37:16

bit
Archived Plugin Author
From: Philippines
Registered: 2005-02-14
Posts: 65
Website

Re: [archived] mdp_SectionMenu

I may be overlooking something but it seems that no one has gotten the problem of having a different section name than the section title.

Inserting <code>$sectiontitle = safe_field(“title”, “txp_section”, “name=’$sectionname’”);</code>
right after line 31 (<code>$sectionname = ($sect == ‘default’) ? ‘home’ : $sect;</code>),
and then replacing the line <code>$content = tag(ucwords($sectionname),‘span’);</code>
with <code>$content = tag(ucwords($sectiontitle),‘span’);</code>
would then make the plugin give you the section titles instead of the section names.

Great plugin, btw. :-)

Last edited by dreamstormer (2005-08-03 17:39:02)


“The neighboring marshmallow factory fared no better, having been unable to absorb the incredible pressure wave.”

Offline

#58 2005-08-03 22:27:47

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

Re: [archived] mdp_SectionMenu

Just out of the gates:

0.5

  • Section title’s work. The displayed name is now the title instead of the name, nothing else changed.
  • order and noshow can now have spaces between section names (for those that accidently throw in an extra space).

As usual, post or email me with as much info and examples if there’s a problem.

http://greenrift.textdrive.com/projects/11/section-menu

Last edited by greenrift (2005-08-03 22:28:01)

Offline

#59 2005-08-17 01:37:30

ywickham
Member
Registered: 2005-06-11
Posts: 38
Website

Re: [archived] mdp_SectionMenu

I’m using this plug in on the following site:

http://tnri.yazminmedia.com/

It works fine until a search is performed. To duplicate the problem, go the the search page and search for “jobs”. It will return a search listing. The problem I am having is that all my navigation links from the Search Results page are created as if they are subdirectories of the search page, when they are not. For example, this is the “About Us” link from the section menu navigation on my Search Results page:

http://tnri.yazminmedia.com/search/about

The correct link should be:

http://tnri.yazminmedia.com/about

How do I fix this?

Thanks!

Offline

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

Board footer

Powered by FluxBB