Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#109 2005-11-28 21:12:30
Re: [plugin] [ORPHAN] rdt_dynamenus - automatic section and article menus
I would like to suggest a feature to this plug-in.
The idea is not original: it’s taken from ako_nav plug-in.
In fact, my suggestion is to merge some ako_nav features into rdt_dynamenus to make it the “ultimate section menu plug-in” (woah).
ako_nav is a plug-in for creating customized section navigation list. It’s a plug-in to output “dynamically” a section list. The truth is that the list is generated from the attribute values in the plug-in tag. I mean, the sections arent pulled from the DB.
That can be cool, because in your nav menu you can create links to sections that you dont manage with TXP
Of course, the negative side is that you only get what you type as attribues values in the plug-in. So, it’s isnt really a “dynamic” menu, but a “static” menu written as a nice plug-in.
The request for rdt_section_menuis:
-to have the option for creating list items that links to sections that are not in the TXP database.
It could be something like this:
order="default,articles,/catalog,about-us,contact,/forum"
Notice there is a slash in front of “catalog” and “forum” section.
That would mean that this section doesnt exist in the TXP database, and that the plug-in should create a link to /catalog section, and also a link to a /forum section.
but what about a more-human-friendly title for section “catalog” and “forum”?
A “title” attribute , similar to “name” attribute in ako_nav would do the job:
title="Our Catalog,The Forums"
(following the same order in the “order” attribute)
So, the title attribute will give the title for the sections that arent in TXP database.
That’s all.
Offline
#110 2005-11-29 23:14:18
Re: [plugin] [ORPHAN] rdt_dynamenus - automatic section and article menus
> maniqui wrote:
> I would like to suggest a feature to this plug-in.
The idea is not original: it’s taken from ako_nav plug-in.
In fact, my suggestion is to merge some ako_nav features into rdt_dynamenus to make it the “ultimate section menu plug-in” (woah).
Maniqui,
I’m busy these days on other things not even Txp related and am unlikely to make such efforts as you have requested. Sorry and thanks for your interest.
You could of course fork the dynamenus code …
TV? Buglight for humans.
Offline
#111 2005-11-29 23:20:23
Re: [plugin] [ORPHAN] rdt_dynamenus - automatic section and article menus
hi rdtietjen, thanks for replying!
I’m not requesting this feature for a near future, so I can wait! :)
> You could of course fork the dynamenus code …
I dont even know what PHP stands for!.
Thanks anyway.
The actual version is powerful enough.
Offline
#112 2006-03-01 01:07:47
Re: [plugin] [ORPHAN] rdt_dynamenus - automatic section and article menus
I made some little modifications to rdt_article_menu for my own purposes but perhaps it interests others:
Make article menu using a cleaned-up “url_title” instead of “title”. It means you can have long article titles but short menus. It adds a tag attribute <code>useurltitle=“1”</code> so as not to disrupt normal working of the plug-in.
By cleaned up I mean, replace dashes with spaces and capitalise first letter of each word.
1. At the beginning of the plug-in add a new attribute to <code>extract(lAtts(array(…</code>
Between the line: <code>‘status’ => ‘live’,</code> and <code> ),$atts));</code>
add the line: <code>‘useurltitle’ => ‘’,</code>
2. towards the end of the plug-in, replace:
<pre>$link = tag($Title,‘a’, “ href=’$linkref’”);</pre>
with:
<pre>
/* MOD – if useurltitle then use url_title instead of title */
if ($useurltitle != ‘’) {
$text = preg_replace(‘/-/’,’ ‘,$url_title);
$text = ucwords( $text );
$link = tag($text,‘a’, “ href=’$linkref’”);
} else {
$link = tag($Title,‘a’, “ href=’$linkref’”);
}
</pre>
TXP Builders – finely-crafted code, design and txp
Offline
#113 2006-03-06 18:09:07
- roelof
- Member
- Registered: 2005-03-27
- Posts: 647
Re: [plugin] [ORPHAN] rdt_dynamenus - automatic section and article menus
i have two questions
1) How can i change the order of the category. I don’t want to get i alphabeticall.
2) If a choose a section the last message is shown. How can i change this so the first message is shown.
Roelof
Offline
#114 2006-03-06 20:12:58
Re: [plugin] [ORPHAN] rdt_dynamenus - automatic section and article menus
Roelof, not sure if this plugin sorts categories, but if you want to change the sort order of articles you should be able to use any of the sortby="...."
variables textpattern uses (take a look at this article_custom description and this sortby attribute info in the textbook) as well as sortdir="asc"
or sortdir="desc"
to say whether ascending or descending.
If by question 2) you meant how to get a particular article to show up alongside the list, see Making an Article Static and Top Positioned also from the textbook.
TXP Builders – finely-crafted code, design and txp
Offline
#115 2006-03-06 20:28:35
- roelof
- Member
- Registered: 2005-03-27
- Posts: 647
Re: [plugin] [ORPHAN] rdt_dynamenus - automatic section and article menus
i will look into the sortby attribute.
With question 2 i mean, if a choose a category all the articles in that section are shown and in het head-screen the last article of that section is shown. I want the first and oldest to be shown. You can see what i mean at http://test.tamarawobben.nl
Offline
#116 2006-03-07 00:57:53
- marios
- Archived Plugin Author
- Registered: 2005-03-12
- Posts: 1,253
Re: [plugin] [ORPHAN] rdt_dynamenus - automatic section and article menus
I find this plugin still usefull, I’ve used it pretty much,however testing today for some multi language related things I discovered, that it will not support this, because instead of the section labels that you’d want in that case in it’s no-textiled form, it will use the section name part which will be cleaned for the URL part.
I wished there would be a way for a plugin that does account for the labels, and still have the same functionallity.
Another thing that would be usefull would be an additional attribute that will give you the choice of having your list items with anchors or strong elements for the labels.
This would allow you to have full logical Site navigation structures on 3 levels with a minimum amount of building blocks.
Unfortunatelly my php knoledge is minimal.
regards, marios
Last edited by marios (2006-03-07 00:59:30)
⌃ ⇧ < ⎋ ⌃ ⇧ >
Offline
#117 2006-03-10 03:29:23
- jessejericho
- Member
- Registered: 2005-10-29
- Posts: 25
Re: [plugin] [ORPHAN] rdt_dynamenus - automatic section and article menus
How do you use the dateposted=“to_date” variable? I would like to create a navbar that only selects from a certain few articles within a section – so I was thinking I would change the publish date of these articles to some time far in the past, and then tell the plugin to only grab articles from that time. This way, new articles won’t show up… will this work? Anyone know how to use this?
Offline
#118 2006-03-10 03:49:32
Re: [plugin] [ORPHAN] rdt_dynamenus - automatic section and article menus
@jessie-you could always use article_custom for what you need to do as well. In fact for what you are talking about I can see it being much quicker and simpler.
Offline
#119 2006-03-10 03:56:10
- jessejericho
- Member
- Registered: 2005-10-29
- Posts: 25
Re: [plugin] [ORPHAN] rdt_dynamenus - automatic section and article menus
soulship wrote:
@jessie-you could always use article_custom for what you need to do as well. In fact for what you are talking about I can see it being much quicker and simpler.
Now that I think of it, sorting by date won’t work either. I need to be able to put a number of articles into a category, and either have rdt_dynamenus or article_custom only show articles from that category. I thought this would be easy by using the if_category tag, however I can’t seem to get that tag to work. Take a look at my thread here, last post:
Offline
#120 2006-03-10 21:16:48
- jessejericho
- Member
- Registered: 2005-10-29
- Posts: 25
Re: [plugin] [ORPHAN] rdt_dynamenus - automatic section and article menus
Is there any way to use rdt_article_menu with categories? ie txp:rdt_article_menu category=“thiscat” …? If I could do that, I think it would solve my problem. This way I could just tell it to grab articles from a certain category, and build my navbar with that…
Offline