Changing the title of the Header component ?

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

Changing the title of the Header component ?

Damien Pollet
I'm trying to make a custom header as a subclass of PRHeaderWidget.
I'd like it to have a title and a subtitle so I made
subtitleDescription, defaults, and accessor inspired by the ones for
title in PRHeaderWidget.

Changing the subtitle from the Settings command works, but not the
title. As far as I understand it, the PRComponent holds the state to
configure instances of the PRHeaderWidget. When changing its settings,
it will update that state, unless it has fields with the same name.
In this case, #title from PRComponent is masking the one in
PRHeaderWidget, so when I change the Title from the web, I'm changing
the structure instead of the seaside component configuration... is
this really wanted? shouldn't the Edit command modify the structure
and Settings the component settings? Or was the idea that Edits are
persisted but not Settings ?

--
Damien Pollet
type less, do more [ | ] http://typo.cdlm.fasmz.org

_______________________________________________
SmallWiki, Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

Re: Changing the title of the Header component ?

keith1y
Damien Pollet wrote:

> I'm trying to make a custom header as a subclass of PRHeaderWidget.
> I'd like it to have a title and a subtitle so I made
> subtitleDescription, defaults, and accessor inspired by the ones for
> title in PRHeaderWidget.
>
> Changing the subtitle from the Settings command works, but not the
> title. As far as I understand it, the PRComponent holds the state to
> configure instances of the PRHeaderWidget. When changing its settings,
> it will update that state, unless it has fields with the same name.
> In this case, #title from PRComponent is masking the one in
> PRHeaderWidget, so when I change the Title from the web, I'm changing
> the structure instead of the seaside component configuration... is
> this really wanted? shouldn't the Edit command modify the structure
> and Settings the component settings? Or was the idea that Edits are
> persisted but not Settings ?
>
>  
Dear Damien,

from what I remember the title in the header widget is set to the name
of the PRKernel which you are using. To rename this. I think that
(PRKernel instanceNamed: 'pier') name: 'new name'. should do it. In the
Pier-PersistencyManager package I provide a control panel UI for
renaming and adding/removing kernels. I havent had a chance to fully get
this working in Seaside 2.8, but if you are only using a non-magma
persistency it should be ok.

Keith
 

_______________________________________________
SmallWiki, Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

Re: Changing the title of the Header component ?

Damien Pollet
On 07/08/07, Keith Hodges <[hidden email]> wrote:
> from what I remember the title in the header widget is set to the name
> of the PRKernel which you are using.

Yes, the default value for the header title is %k, which gets expanded
to the kernel name. You can have the root or current page title also,
see PRMacroExpander.

So the PRComponent gets %k as a default title and you can change it
from the web with both Edit and Settings commands. The problem is that
the new title is stored in the PRComponent, not the PRHeaderWidget,
and the latter doesn't have access to the new value so it always uses
its default.


--
Damien Pollet
type less, do more [ | ] http://typo.cdlm.fasmz.org

_______________________________________________
SmallWiki, Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

Re: Changing the title of the Header component ?

Lukas Renggli-2
Now I understand this problem. This was caused by a conflict caused  
by the merging of meta-descriptions. I changed #title to #heading in  
my latest commit.

Thanks for reporting.

Lukas

On 7 Aug 2007, at 01:54, Damien Pollet wrote:

> On 07/08/07, Keith Hodges <[hidden email]> wrote:
>> from what I remember the title in the header widget is set to the  
>> name
>> of the PRKernel which you are using.
>
> Yes, the default value for the header title is %k, which gets expanded
> to the kernel name. You can have the root or current page title also,
> see PRMacroExpander.
>
> So the PRComponent gets %k as a default title and you can change it
> from the web with both Edit and Settings commands. The problem is that
> the new title is stored in the PRComponent, not the PRHeaderWidget,
> and the latter doesn't have access to the new value so it always uses
> its default.
>
>
> --
> Damien Pollet
> type less, do more [ | ] http://typo.cdlm.fasmz.org
>
> _______________________________________________
> SmallWiki, Magritte, Pier and Related Tools ...
> https://www.iam.unibe.ch/mailman/listinfo/smallwiki

--
Lukas Renggli
http://www.lukas-renggli.ch


_______________________________________________
SmallWiki, Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki