Hi, i have some questions about cakephp, i spent long time googling for a solution and as i didn't find any i'm not sure i'm taking the right approach.
So, i have a menu/sitemap wich is part static (xml file - i10n) and part dynamic (database i18n)
i've been asked to cache the menu so that:
A component creates a cache xml file of the whole menu for each language if it doesn't exist
An helper creates a cache html formatted from the xml file created from the component
The layout uses the helper to add the menu in the page
Questions: - How do i get the list of available languages from the helper and from the component?
- Is this
$this->L10n = new L10n(); $this->L10n->lang
the correct way to get the actual language?
if i import the helpers/component in the app_controller instead of typing them in each controller
class AppController extends Controller { var $components = array('menu', 'otherComponent'); var $helpers = array('menuCache');
function beforeFilter(){ $this->menu->doSomething(); } }
i get a "call to undefined object $html" for the echo $html->charset(); in the layout
can't understand why...
thanks for your help