This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use Stack Overflow.

Day 7 $this->getResponse()->setTitle($title) puts out array

Discussion around this tutorial for symfony 1.0.x

Day 7 $this->getResponse()->setTitle($title) puts out array

by ToZa » Fri May 26, 2006 6:40 pm

Hi,

I Set $this->getResponse()->setTitle($title)
in the view.yml.

And title of the page now ist "Array" ??

Any suggestion what i can do ??

Thanks Torsten
ToZa
Junior Member
 
Posts: 8
Joined: Sat May 20, 2006 2:17 pm

Re: Day 7 $this->getResponse()->setTitle($title) puts out array

by francois » Mon Jun 05, 2006 6:17 pm

This method is to be used from an action, not from a yaml configuration file. Please read the related chapter.

http://www.symfony-project.com/content/book/page/templating_ configuration.html
francois
Faithful Member
 
Posts: 1638
Joined: Sat Oct 22, 2005 4:56 pm

Re: Day 7 $this->getResponse()->setTitle($title) puts out array

by vampirus87 » Wed May 19, 2010 10:57 am

in which files and position do I include the this->getResponse()->setTitle($title) then. Do help. Thank u.
________________________
Live Life CooL...
vampirus87
Junior Member
 
Posts: 3
Joined: Wed May 19, 2010 3:40 am
Location: Kuala Lumpur

Re: Day 7 $this->getResponse()->setTitle($title) puts out array

by halfer » Wed May 19, 2010 11:56 am

This post is nearly 4 years old, so bear that in mind - unless you are working on a legacy project containing symfony 1.0, it is best to start with symfony 1.3 or 1.4 these days.

Any reference to $this must go in a class, and in this case, the method getResponse() must go in an action. In your case it is probably actions.class.php for the module in question.
halfer
Faithful Member
 
Posts: 10148
Joined: Mon Jan 30, 2006 1:16 pm
Location: West Midlands, UK