Content last modified Monday 6 March 2017
hop to #bottom
Categories:
Author:
Current version:
0.5
About It:
Get it:
Rate it:
  • Helpful?
  • 2 Yes
  • 0 No
Flag it:

If you'd like to provide updated information and do not have access to directly edit, please contact the site admin; thanks!

rdt_dynamenus

The rdt_dynamenus plugin automagically generates section-aware menus of sections and articles and ensures that they are automagically updated whenver new sections or articles are added to the website.

Two tags, rdt_article_menu and rdt_section_menu, together enable easy maintenance of 2 dimensional websites where _section- and article are the two axes. They eliminate the need to handcode links and categories as is needed for menus generated by txp:linklist or to hardwire multiple sections into different invocations of the txp:article_custom tag.

The rdt_section_menu is aware of the current section and marks it with a CSS class as ‘active’. The rdt_article_menu shows only articles assigned to the current section, and marks the currently displayed article with the CSS ‘active’ class.

Article Request Count:
Keywords/tags:
Initially released:
2005-03-07
Posted here:
07 Mar 2005
Article modified:
02 Nov 2006

If there is a comment form at the Information URL, you may want to leave your comments/questions there or at the Forum thread for quicker feedback. Otherwise, comment away:

Your comment will NOT be submitted until you click the 'Submit' button on the next pageload.

Commented (6)

A really neat time-saving plugin, thanks a lot for this one :)

Should be integrated to 1.0 !
Jussi Ruokomaki:
I didn’t need a wraptag. Instead, it was in my way so I took it off by replacing

[code]
$out[] = ($break != ‘br’)
? tag($link, $break, implode(‘’,$tagatts))
: ”$link”;
[/code]

with

[code]
if ($wraptag "") {
$return_string .= ($break != 'br')
? tag($link, $break, implode('',$tagatts))
: "$link";
} else {
$out[] = ($break != 'br')
? tag($link, $break, implode('',$tagatts))
: "$link";
}
[/code]

and

[code]
return tag(implode("\n", $out),$wraptag,$id.$class);
[/code]

if ($wraptag “”) {
return $return_string;
} else {
return tag(implode(”\n”, $out),$wraptag,$id.$class);
}

both at the end of the function rdt_article_menu(). Pretty ugly hack, but this way wraptag=”” doesn’t give out a tag with no name.
Jussi Ruokomaki:
Oops. The code part of the last comment should’ve ended the following way:

and

[code]
return tag(implode(”\n”, $out),$wraptag,$id.$class);
[/code]

with

[code]
if ($wraptag “”) {
return $return_string;
} else {
return tag(implode(”\n”, $out),$wraptag,$id.$class);
}
[/code]
The download link is not working here or in the forum.

Awesome! This is really great for portfolio sites based on articles. I’ve always had headaches after organizing the work and then trying to go back and change the position of one “article”. Thanks!

ha, ignore that last comment, posted for the wrong plugin.

Subscribe to this article's comments RSS feed. [ ? ]   View Recent Comments across the site.

Would you care to write a comment or visit the forum discussion?

You know you want to visit the Archives.

Browse

Categories


Articles

There are also tag clouds, 'cause those are fun.
Published with Textpattern