Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: [plugin] [ORPHAN] rdt_dynamenus - automatic section and article menus
well, I’m no expert on this but I’ve found that when developing txp site offline, with each in a subdirectory of their own, many of the plug-ins no longer output a correct URL in RC3. The subdirectory is omitted. There’s no problem if it’s not in a subdirectory.
In RC2 everything worked as you could add the subdirectory in the admin panel. In RC3 the option was taken out (tho’ I believe you can add it by hand to the admin config) and the $pfr path-from-root variable deprecated. However, lots of plug-ins still use it.
If you don’t have this problem, then it’s not important for you.
My home-baked way of solving the problem was to change all occurrences of $pfr into hu, for example where it says $pfr.$section it now says hu.$section. A simpler way turned out to be adding a line directly beneath the definition of global variables, almost always in the first lines of a plug-in:
<pre>
$pfr = hu;
</pre>
hu is the global variable for the definitive http address of the site. (see the comments in publish.php) so basically it forces absolute links to be generated including subdirectory.
TXP Builders – finely-crafted code, design and txp
Offline
#32 2005-04-25 18:20:32
- jpdupont
- Member
- Registered: 2004-10-01
- Posts: 752
Re: [plugin] [ORPHAN] rdt_dynamenus - automatic section and article menus
:) Thanks ! I understand now !
Offline
#33 2005-04-27 21:59:52
- marios
- Archived Plugin Author

- Registered: 2005-03-12
- Posts: 1,253
Re: [plugin] [ORPHAN] rdt_dynamenus - automatic section and article menus
Wouldn’t it be good if one could actually display a specified range of sections in the ul like in mdp_section menu ?
I mean so you can exclude sections.
regards, marios
⌃ ⇧ < ⎋ ⌃ ⇧ >
Offline
Re: [plugin] [ORPHAN] rdt_dynamenus - automatic section and article menus
marios,
if you use the order parameter, everything that is not included in the list is left out.
general comment:not sure if I have understood this correctly but RC3 changeset 326 adds a new title field for categories and sections to the database. I hope this is the solution for all those foreign name problems and converting back and forth acrobatics above. Maybe then alias workarounds are a thing of the past as they are now stored directly in the database.
As far as I know they are not editable from the admin like URL-title so the question of their order is still an issue.
TXP Builders – finely-crafted code, design and txp
Offline
#35 2005-04-29 12:28:10
- marios
- Archived Plugin Author

- Registered: 2005-03-12
- Posts: 1,253
Re: [plugin] [ORPHAN] rdt_dynamenus - automatic section and article menus
jakob,I just reverted back to rdt_dynamenus(great plugin) and it let’s you actually exclude a range of sections, in the section_menu tag something that I probably had missed before.So the problem is solved for now.
So in one of my page temlates it looks like this:
<code>
<txp:rdt_section_menu
wraptag=‘ul’
break=‘li’
class=‘menu’
active=‘active’
id=‘sections’
noshow=‘houston,news,weird’
home=‘home’
order=’‘
/>
</code>
I’m on revision 328 and it works great.
⌃ ⇧ < ⎋ ⌃ ⇧ >
Offline
Re: [plugin] [ORPHAN] rdt_dynamenus - automatic section and article menus
I have problem with order attribute with this plugin. It seems that with revision 329 I can´t get any sections showing with order attribute.
My code looks like:
I also found out that rdt_dynamenus can´t read my site URL right from admin preferences. I am currently updating my work website and have installed textpattern at http://mysite.net/txp . All the links from rdt_section_menu are pointing to http://mysite.net/section when it should be http://mysite.net/txp/section . I am using clean URL mode. I think this is also the reason why I can´t get rdt_article_menu to show articles from my active section as it can´t recognize active section (because of the wrong URL).
Any help?
Last edited by t0ma (2005-05-03 09:13:09)
“The role of art is to make a world which can be inhabited.”
Offline
Re: [plugin] [ORPHAN] rdt_dynamenus - automatic section and article menus
Hi rdtietjen,
Now that we have section ‘name’ and section ‘title’ most of my above hacks are unnecessary. Any chance of you updating rdt_section_menu to use section title for display and section name for the url and the id? mary’s handy little upm_section_title plug-in shows how to retrieve the new field. That would be just excellent :-)
TXP Builders – finely-crafted code, design and txp
Offline
Re: [plugin] [ORPHAN] rdt_dynamenus - automatic section and article menus
I would second that, jakob. :)
EDIT: See below: Yaeh!
Last edited by soulship (2005-05-18 02:51:39)
Offline
Re: [plugin] [ORPHAN] rdt_dynamenus - automatic section and article menus
> jakob wrote:
> Now that we have section ‘name’ and section ‘title’ most of my above hacks are unnecessary. Any chance of you updating rdt_section_menu to use section title for display and section name for the url and the id? mary’s handy little upm_section_title plug-in shows how to retrieve the new field. That would be just excellent :-)
I’ve incorporated the title into my plugin and will soon post it to my site and announce it here. I want to make sure that the plugin remains backwards compatible first.
TV? Buglight for humans.
Offline
Re: [plugin] [ORPHAN] rdt_dynamenus - automatic section and article menus
> t0ma wrote:
> I have problem with order attribute with this plugin. It seems that with revision 329 I can´t get any sections showing with order attribute.
My code looks like:
> txp:rdt_section_menu wraptag=“ul” break=“li” order=“Home,Activities,Sectors,Organization,Archives,Links,Contact” home=”“
Huh… is there a problem because of upper case letters?
> I also found out that rdt_dynamenus can´t read my site URL right from admin preferences. I am currently updating my work website and have installed textpattern at http://mysite.net/txp . All the links from rdt_section_menu are pointing to http://mysite.net/section when it should be http://mysite.net/txp/section . I am using clean URL mode. I think this is also the reason why I can´t get rdt_article_menu to show articles from my active section as it can´t recognize active section (because of the wrong URL).
maybe try Jakob’s idea of sticking $pfr=hu; at the top of the plugin code
But, rdt_article_menu doesn’t use $pfr, it uses TXP functions permlinurl or formatPermLink
Is your admin -> preferences -> site url correctly set?
TV? Buglight for humans.
Offline
Re: [plugin] [ORPHAN] rdt_dynamenus - automatic section and article menus
> TheodoreG wrote:
> It seems to create clean URLs even when I’m in messy mode.
> Also the “Home” link points to /my_webserver_root/home? Shouldn’t that be just /my_webserver_root/?
It doesn’t do this as you wish but I think it should let you present the default section as Home. I think I’ll add a default=‘Home’ attribute and deprecate the home attribute. but later.
TV? Buglight for humans.
Offline
Re: [plugin] [ORPHAN] rdt_dynamenus - automatic section and article menus
Announcement: rdt_dynamenus plugin v0.6 now uses section titles and the default section as home. Learn more at Publishing Pipelines or read the documentation.
I’ve updated the rdt_dynamenus plugin to take advantage of the new title field in the txp_sections table. the section title now displays in the rdt_section_menu while the section name field continues to serve for the URL of the link. No more tricks with hyphens to emulate spaces; sort order is decoupled from display text. Judiciciously named sections may even obviate the use of the order attribute and thus preserve better dynamism.
Also, I’ve added a new default attribute named after the so-called default section that supplies a display title and simultaneously places it at the beginning of the section menu as the home page. The old home attribute is deprecated now in favor of default.
Backward compatibility is maintained I believe at least back to rc2, maybe even rc1.
Thanks to Jakob R for testing and suggestions.
Last edited by rdtietjen (2005-05-24 11:49:04)
TV? Buglight for humans.
Offline
Re: [plugin] [ORPHAN] rdt_dynamenus - automatic section and article menus
Great job! I found no bugs and this will really help with those elusive cat titles. Thanks for all the extra work to update this. It is very handy indeed.
Offline
Re: [plugin] [ORPHAN] rdt_dynamenus - automatic section and article menus
rdtietjen, the first link is broken, you forgot the http:// part.
Thanks for this update!
Offline