Hi Briggsy,
Try running the snippet cached, all my problems were because I was calling it uncached.
Cheers, Garry
Garry Nutting
Senior Developer
MODX, LLC
Email:
[email protected]
Twitter: @garryn
Web: modx.com
-
- 372 Posts
Quote from: garryn at Feb 27, 2006, 10:09 AM
Hi Briggsy,
Try running the snippet cached, all my problems were because I was calling it uncached.
Cheers, Garry
hey garry, sorry my mistake I am calling it cached [[DropMenuAccessKey? textOfLinks=menutitle &titleOfLinks=longtitle]]
I have tried uncached as well, and with page set to cached and uncached.
I also put the [*accesskey*] TV in the template in both the Head and in the Body and neither helped
-
- 145 Posts
This may sound really silly, and you have probably already checked it, but is your template variable called accesskey or accessKey (as in my specification)? I think they are case sensitive. It sounds like a problem with your TV if you can’t even call it in the template directly.
-
- 372 Posts
Quote from: Kunal at Feb 27, 2006, 10:38 AM
This may sound really silly, and you have probably already checked it, but is your template variable called accesskey or accessKey (as in my specification)? I think they are case sensitive. It sounds like a problem with your TV if you can’t even call it in the template directly.
yea it was a case isssue, doh. Thanks it works now
Can I suggest you make the cases more obvious? All lower case except for the "K" is hard to see the case is different, espically from the GIF example.
-
- 145 Posts
Quote from: Briggsy at Feb 27, 2006, 11:57 AM
Can I suggest you make the cases more obvious? All lower case except for the "K" is hard to see the case is different, espically from the GIF example.
Apologies. I have a naming convention that all my snippets and TVs and Plugins begin with a lower case and then use CamelCasing for the rest of the word. It’s just the way I work. I will amend my first post and write out the details of the TV.
In fact, what I could do is modify [tt][[DropMenu]][/tt] in such a way that you can define the appropriate TV in a snippet call (e.g. [tt][[DropMenu? &accesskeytv=`accesskeys`]][/tt]) with a default value set of [tt]accessKey[/tt]. I’ll get to work on this at some point today if everyone thinks it to be a good idea.
-
- 372 Posts
Is there any way to stop the snippet from adding [Alt+] when there is no access key assigned?
I only want a few menu items to have an access keys, yet every menu item gets the [Alt+] added to the pop up description.
I notice in the snippet there is the following line which appears from my limited knowledge to only add it if it is set but that doesn’t seem to work in my case. ((isset($accessKey[’accessKey’])) ? ’ [Alt+’.$accessKey[’accessKey’]
'<a '.((isset($accessKey['accessKey'])) ? 'accesskey="'.$accessKey['accessKey'].'" ' : '').'href="[~'.$child['id'].'~]" title="'.$child[$titleOfLinks].((isset($accessKey['accessKey'])) ? ' [Alt+'.$accessKey['accessKey'].']' : '').'">'.$pre.$child[$textOfLinks].$post.'</a>';
-
- 145 Posts
@Briggsy
It should already behave like that. Strange, when I leave my TV blank, then those lines I added to [tt][[DropMenu]][/tt] do not execute. Anyone else getting this problem? (You don’t have anything set as a default value for your TV do you? No blank spaces?)
-
- 372 Posts
@Kunal: Nope there is no default set at all
@Garry: Your patch worked fine, now running to see what happens
-
- 145 Posts
Thanks very much guys. I have updated the .zip file. Much appreicated
garryn.