Changing the title of the page for each controller

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Changing the title of the page for each controller

ZuLuuuuuu-2
Hello,

Today's noob questions is...

I want my page's title to change when I navigate between my
controllers. For example, I have my main page which is titled "Main
Page", I also have a "members" page/controller. When the user visits
this page, I want the title to be "Members".

I tried having title in an instance variable of my application. But
inserting:

self title: 'Members'.

on the beginning of my "members" controller does not change until a
reload, since, I guess, updatePage: method is executed before title
changes.

How can I solve this problem? Maybe by using JavaScript?


Canol
Reply | Threaded
Open this post in threaded view
|

Re: Changing the title of the page for each controller

Nicolas Petton
Le samedi 12 juin 2010 à 06:41 -0700, ZuLuuuuuu a écrit :
> Hello,
>
> Today's noob questions is...
Actually it's not a noob question, you found a bug :D
I fixed it in master. The problem was that #updatePage: was called
before controller methods.

If you don't want to use the dev branch, you can avoid the problem with
a simple workaround:

MyApplication>>someController [
    <category: 'controllers'>
    page head title: 'foo'.
    ....
]

We'll try to do releases more often, so it will be in stable soon
anyway.

Thanks,
Nico

signature.asc (205 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Changing the title of the page for each controller

ZuLuuuuuu-2
The workaround didn't work, maybe other part of my code was disrupting
it. But I did the small fix you did on git rep, manually, now it is
working...

On Jun 12, 5:07 pm, Nicolas Petton <[hidden email]> wrote:

> Le samedi 12 juin 2010 à 06:41 -0700, ZuLuuuuuu a écrit :> Hello,
>
> > Today's noob questions is...
>
> Actually it's not a noob question, you found a bug :D
> I fixed it in master. The problem was that #updatePage: was called
> before controller methods.
>
> If you don't want to use the dev branch, you can avoid the problem with
> a simple workaround:
>
> MyApplication>>someController [
>     <category: 'controllers'>
>     page head title: 'foo'.
>     ....
> ]
>
> We'll try to do releases more often, so it will be in stable soon
> anyway.
>
> Thanks,
> Nico
>
>  signature.asc
> < 1KViewDownload
Reply | Threaded
Open this post in threaded view
|

Re: Changing the title of the page for each controller

Nicolas Petton
Le samedi 12 juin 2010 à 08:41 -0700, ZuLuuuuuu a écrit :
> The workaround didn't work, maybe other part of my code was disrupting
> it. But I did the small fix you did on git rep, manually, now it is
> working...

Ok, we should release Iliad 0.8.2 next week, so you won't have to keep
your fix too long :)

Cheers,
Nico

signature.asc (205 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Changing the title of the page for each controller

ZuLuuuuuu-2
On Jun 12, 7:28 pm, Nicolas Petton <[hidden email]> wrote:
>
> Ok, we should release Iliad 0.8.2 next week, so you won't have to keep
> your fix too long :)
>
> Cheers,
> Nico

That would be great, thank you...