Dec 04, 2008, 01:01 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
Search via SMF or Google: modx forums all of modxcms.com web
  MODxCMS.com   Forums   Help Login Register  
Pages: [1]   Go Down
  Print  
Author Topic: Cannot duplicate snippets  (Read 1161 times)
0 Members and 1 Guest are viewing this topic.
sottwell
Documentation Team
*
Posts: 8,170



WWW
« on: Feb 23, 2006, 11:52 PM »

I have discovered the hard way that you cannot duplicate and rename snippets and expect the two to behave independently if both called on the same page.  As far as I can tell, the first of the snippets you call will override all other versions.

To be specific, I was playing with the DropMenu variation that adds Access Keys.  I didn't feel like modifying the version I have already modified to include a "here" class when using selfAsLink.  So I just duplicated it, replaced the content with the version adding access keys, and modified the name.  Then in my top menu I call DropMenuAK directly from the template.  In my left sidebar TV I call DropMenuL.  Both are called with selfAsLink set to true.  Both show the access keys, neither have the "here" class.

 I then tried deleting all copies and creating new, with totally unrelated names.  Same behavior.  No caching, by the way.

However, if I call the version in the left without selfAsLink, that works, the active page item is not a link.  But it still has the accesskey tags added to it! 

Spooky  Shocked
« Last Edit: Feb 23, 2006, 11:54 PM by sottwell » Logged

sottwell.com has moved to a lovely Solaris 10 server!
Log in username guest, password guestuser.
Templates are now becoming available at http://sottwell.com/templates.html
rthrash
Foundation
*
Posts: 9,575



WWW
« Reply #1 on: Feb 24, 2006, 01:39 AM »

Sounds like DropMenu needs to join MemberCheck and NewsListing in the change to a real class. Anyone up for assisting with this?
Logged

MODx is a framework that allows web professionals to turn over sites to end-users for daily maintenance without worrying. Community participation and questions are encouraged, especially when you help us help you, read the wiki, and review snippet parameters – even if you have to look at the source. Searching the forums helps, too.
Ryan Thrash
MODx Co-Founder
Principal @ Collabpad
work productively.
work intelligently.
work together.
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP

Copyright © 2005-2008 MODxCMS, All rights reserved. Contact Us
Styles by ziworks.com

Powered by SMF 1.1.4 | SMF © 2005, Simple Machines LLC

Valid XHTML 1.0! Valid CSS!