-
- 1,193 Posts
DropMenu Mod 1.2
This is a modification to the MODx DropMenu Snippit.
It adds the ability to set a CSS class and the HTML relationship for the <a> tags in DropMenu, i.e. :
<li><a href="contact-us.html" class="nameofclass" rel="relationship" title="Contact us through this web form">Contact Us</a></li>
Set in snippet as [[DropMenu? &linkClass=`nameofclass`]]. When specified in the snippet call, it adds the `class="nameofclass"` as seen above in red. If it is not specified, there is no change to the Drop menu snippet, so you don’t have to worry about it outputting empty class calls i.e. `class=" "`.
*** edit *** April 3rd 2006
Set in snippet as [[DropMenu? &rel=`relationship`]]. When specified in the snippet call, it adds the `rel="relationship"` as seen above in blue. If it is not specified, there is no change to the Drop menu snippet, so you don’t have to worry about it outputting empty rel tags, i.e. `rel=" "`.
This is very beta, so please back up your original DropMenu before you use this. If you use this, please post whether it works for you or it doesn’t.
enjoy,
-sD-
scottyDelicious
-
- 203 Posts
It’s perfect for what I need! I just need to do that :
[[DropMenuEx?linkClass=lbOn]]
and all the pages are shown in Lightbox... you have to create a special template for these documents, but it’s not a big deal when the menu generates itself!
Blaise Bernier
www.medialdesign.com - Solutions for small business, hosting, design and more!
-
- 1,193 Posts
Cool Blaise!
Let us all know when you get your site running! (As of this post, it only shows the construction page).
-sD-
ScottyD, please link to this thread in the tracker in the DropMenu project. Thanks!
Ryan Thrash, MODX Co-Founder
Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
-
- 1,193 Posts
hmmm?
Aour, I got this error the first time I edited it, because I didn’t put the variable in all the maps. When I made sure it was listed in all the map areas, it worked without problems.
Is anyone else having this issue?
Aour, can you tell me a bit about your server environment?
-sD-
scottyDelicious
-
- 835 Posts
Hi
I do my test locally with Xampp :
Apache/2.0.54 (Win32)
PHP/5.0.4
MySQL 4.1.13
MODx 0.9.1 (rev 646)
I switch to PHP/4.4.0 but it’s the same result
-
- 1,193 Posts
I am sorry Aour, but I am unable to recreate the error using the file attached to the first post. Would you humor me, and re-download it from the first post?
-sD-
-
- 203 Posts
Hi! Now that I got the custom class in the links, I would need to add a custom ’rel’ attribute... would it be possible??
thanks a lot!
bye,
Blaise
Blaise Bernier
www.medialdesign.com - Solutions for small business, hosting, design and more!