Thanks for the answers.

It looks like I need to describe my problem a little bit better.

If I follow the blog tutorial, I sooner or later create a view
index.thtml for the posts.
The corresponding posts_controller contains a function index() in
which I use
$this->set('posts', $this->Post->findAll());
to set a template variable. This template variable is then available
in the
template index.thtml.

The view index.thtml only creates the html that comes within the body
tag of the final
html output, the rest of this final html file comes from the file
default.thtml which is the
standard layout.

Now I want to change the standard layout:
To override the standard default.thtml I created a copy in the folder
app/views/layouts.

And here is the problem:
I would like to use something like it is done for index.thtml - I want
to set a template
variable that is then available in the default.thtml. An example would
be setting the
meta tags depending on the selected language of the user.

Setting $this->layout in a controller certainly enables me to use
another template file as
layout, but I still do not know how to set template variables into
this layout.

Setting such a variable in a controller for a view might work, but
unless I misunderstand
the suggestion this would mean setting the variable in _every_
controller as I want to have
the template variable always.

Thanks a lot for your help

Claudia


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to