My custom component menu item keeps ignoring the lexicon values.
- Created a namespace named bookingsystem pointing to core/components/bookingsystem
- Created an action controller in above namespace pointing to bookingsystem:default for its language topics
- Created a menu item with correct lexicon keys for name and description
- Created the lexicon file default.inc.php in the directory lexicon/en inside the directory to which the namespace is pointing
- Cleared the cache
Still, in the menu the lexicon keys show up in stead of their values.
MODx "sees" the lexicon file as their keys/values show up in System->Lexicon Management.
Also, if I choose the option from the Component menu, the Smarty tpl is shown.
Any clues to what I might have missed??
MODx Revolution / MAMP / OS X
During CMP development, it’s a good idea to set ’cache_noncore_lexicon_topics’ to 0, or No.
Try that and see if that helps.
shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect |
github |
splittingred.com
Thanks.
I switched it to No but it’s still showing the keys in stead of the values...
Baffled...
MODx Revolution / MAMP / OS X
Can you post exactly what your Menu looks like? (The Update window)
shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect |
github |
splittingred.com
I’ve attached the update window of both the action and the menu.
Is that what you’re looking for?
MODx Revolution / MAMP / OS X
And your lexicon keys are named:
$_lang[’bs.inserttarrif’]
$_lang[’bs.inserttarrif.description’]
and in the default topic file, which should be in your ’bookingsystem’ Namespace’s path/lexicon/en/ ?
You’ve cleared the cache? They should show up, unless you’ve done something wrong.
shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect |
github |
splittingred.com
The file contents look like:
<?php
$_lang['bs.inserttarif'] = 'Build Tariff';
$_lang['bs.inserttarif.description'] = 'Insert new tariff records';
The file is located in lexicon/en (see attached screenshot).
The cache was cleared and I switched that system setting of ’cache_noncore_lexicon_topics’ to No.
MODx Revolution / MAMP / OS X
The contents of insert-tariff.php are:
<?php
return $modx->smarty->fetch( 'insert-tariff.tpl' );
?>
This actually works, as the contents of the tpl (for now just a simple "Hello world) are shown inside MODx manager frame when I choose the option from the "Components" menu.
See the screen shot for the path.
I see a menus.cache.php in the cache directory. Can I manually delete it?
I’ve been slapping that !@$%^ computer all afternoon... >:(
MODx Revolution / MAMP / OS X
Definitely delete it and see if that helps.
shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect |
github |
splittingred.com