Displaying 1 result from an estimated 1 matches for "translatedpag".
Did you mean:
translatedpage
2005 Dec 24
2
Multi language pages (access @session from a model)
...ranslations'' contain a title and body
for an other language.
Now I would like to have an easy way to retrieve the title and body of a
page given the current language (stored in the session). I would like to
put this logic in a model (the Page model, or maybe a new model like
''TranslatedPage''). This way I don''t have to put ugly code in my
controllers and views everytime to fetch the page for the current
language.
However, it seems I can''t access @session from the model. Does anybody
have a good idea on how to implement this?
Thanks in advance!
Greetin...