You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by Mind Bridge <mi...@yahoo.com> on 2005/07/05 22:44:06 UTC

Themes

Hi,

One very frequently requested feature of Tapestry is themes, i.e. the
ability to have different templates depending on the current 'theme'. This
is very similar to the current mechanism of locales (there have even been a
number of patches), and adding it would be very small, yet the positive
effect of that step would be quite significant.

Here is what I propose:

Have a 'theme' property of type String (or perhaps String[]) in the page and
in the engine (a la locale). The corresponding templates could then become:
Home$theme_en. Here the theme has priority, i.e. if the ideal template is
not found, the framework will then search for Home$theme, then for Home_en,
and finally for Home.

Again, this mod is realtively small.

One more issue: it appears important to be able to have a mechanism to
switch the locale (theme) and then proceed with rendering. This is a bit
tricky, as a different locale means a different page object and any changes
in the properties would be lost, but a clear mechanism for that is quite
needed. Perhaps a specialized exception?

-mb


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org


Re: Themes

Posted by Jamie Orchard-Hays <ja...@dang.com>.
Exactly.

Jamie

Mind Bridge wrote:
> Suppose you set your theme to 'admin', and you have the following templates:
> 
> Home
> Home_en
> Home$admin
> 
> Your page would use Home$admin no matter what the locale is, as the theme
> has precedence to the locale.
> I guess this is what you mean by themes not associated with a locale?
> 
> 
> ----- Original Message ----- 
> From: "Jamie Orchard-Hays" <ja...@dang.com>
> To: "Tapestry development" <ta...@jakarta.apache.org>
> Sent: Wednesday, July 06, 2005 12:49 AM
> Subject: Re: Themes
> 
> 
> 
>>how would this work for themes not associated with a locale?
>>Jamie
>>
>>Mind Bridge wrote:
>>
>>>Hi,
>>>
>>>One very frequently requested feature of Tapestry is themes, i.e. the
>>>ability to have different templates depending on the current 'theme'.
> 
> This
> 
>>>is very similar to the current mechanism of locales (there have even
> 
> been a
> 
>>>number of patches), and adding it would be very small, yet the positive
>>>effect of that step would be quite significant.
>>>
>>>Here is what I propose:
>>>
>>>Have a 'theme' property of type String (or perhaps String[]) in the page
> 
> and
> 
>>>in the engine (a la locale). The corresponding templates could then
> 
> become:
> 
>>>Home$theme_en. Here the theme has priority, i.e. if the ideal template
> 
> is
> 
>>>not found, the framework will then search for Home$theme, then for
> 
> Home_en,
> 
>>>and finally for Home.
>>>
>>>Again, this mod is realtively small.
>>>
>>>One more issue: it appears important to be able to have a mechanism to
>>>switch the locale (theme) and then proceed with rendering. This is a bit
>>>tricky, as a different locale means a different page object and any
> 
> changes
> 
>>>in the properties would be lost, but a clear mechanism for that is quite
>>>needed. Perhaps a specialized exception?
>>>
>>>-mb
>>>
>>>
>>>---------------------------------------------------------------------
>>>To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
>>>For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
>>>
>>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
>>
>>
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org


Re: Themes

Posted by Mind Bridge <mi...@yahoo.com>.
Suppose you set your theme to 'admin', and you have the following templates:

Home
Home_en
Home$admin

Your page would use Home$admin no matter what the locale is, as the theme
has precedence to the locale.
I guess this is what you mean by themes not associated with a locale?


----- Original Message ----- 
From: "Jamie Orchard-Hays" <ja...@dang.com>
To: "Tapestry development" <ta...@jakarta.apache.org>
Sent: Wednesday, July 06, 2005 12:49 AM
Subject: Re: Themes


> how would this work for themes not associated with a locale?
> Jamie
>
> Mind Bridge wrote:
> > Hi,
> >
> > One very frequently requested feature of Tapestry is themes, i.e. the
> > ability to have different templates depending on the current 'theme'.
This
> > is very similar to the current mechanism of locales (there have even
been a
> > number of patches), and adding it would be very small, yet the positive
> > effect of that step would be quite significant.
> >
> > Here is what I propose:
> >
> > Have a 'theme' property of type String (or perhaps String[]) in the page
and
> > in the engine (a la locale). The corresponding templates could then
become:
> > Home$theme_en. Here the theme has priority, i.e. if the ideal template
is
> > not found, the framework will then search for Home$theme, then for
Home_en,
> > and finally for Home.
> >
> > Again, this mod is realtively small.
> >
> > One more issue: it appears important to be able to have a mechanism to
> > switch the locale (theme) and then proceed with rendering. This is a bit
> > tricky, as a different locale means a different page object and any
changes
> > in the properties would be lost, but a clear mechanism for that is quite
> > needed. Perhaps a specialized exception?
> >
> > -mb
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org


Re: Themes

Posted by Jamie Orchard-Hays <ja...@dang.com>.
how would this work for themes not associated with a locale?
Jamie

Mind Bridge wrote:
> Hi,
> 
> One very frequently requested feature of Tapestry is themes, i.e. the
> ability to have different templates depending on the current 'theme'. This
> is very similar to the current mechanism of locales (there have even been a
> number of patches), and adding it would be very small, yet the positive
> effect of that step would be quite significant.
> 
> Here is what I propose:
> 
> Have a 'theme' property of type String (or perhaps String[]) in the page and
> in the engine (a la locale). The corresponding templates could then become:
> Home$theme_en. Here the theme has priority, i.e. if the ideal template is
> not found, the framework will then search for Home$theme, then for Home_en,
> and finally for Home.
> 
> Again, this mod is realtively small.
> 
> One more issue: it appears important to be able to have a mechanism to
> switch the locale (theme) and then proceed with rendering. This is a bit
> tricky, as a different locale means a different page object and any changes
> in the properties would be lost, but a clear mechanism for that is quite
> needed. Perhaps a specialized exception?
> 
> -mb
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org


Re: Themes

Posted by Mind Bridge <mi...@yahoo.com>.
Hi Geoff,

I understand your point -- please note that I am only choosing changes that
would be very quick to implement (e.g. until this weekend), are absolutely
essential in many ways (e.g. the client persistence scope), and would only
affect very little the external configuration of the framework (and
Spindle). For example, changes in the client persistence mechanism would
have no effect on Spindle in any way. I am also putting a lower priority on
anything that can be left as an addition to contrib.

I really think you should not worry in this case!

-mb

----- Original Message ----- 
From: "Geoff Longman" <gl...@gmail.com>
To: "Tapestry development" <ta...@jakarta.apache.org>
Sent: Wednesday, July 06, 2005 3:19 PM
Subject: Re: Themes


I would like to ask again... beta is feature freeze right?

The scope of the changes in 4.0 is, as usual, causing me to pull out
my hair w/respect to updating Spindle. My plate is full handling the
changes already in there.  In fact, more than full. I've set the
cutoff point for me already. I have no plans to support the new
Annotation stuff this year.

Piling more on now is not helping keep the peace w/respect to my marriage.

Geoff

On 7/6/05, Mind Bridge <mi...@yahoo.com> wrote:
> Hmm. You are very much right. I will see if I could add an implementation
of
> PageSource and some other things to contrib that does that.
>
> - mb
>
> ----- Original Message -----
> From: "Viktor Szathmary" <ph...@gmail.com>
> To: "Tapestry development" <ta...@jakarta.apache.org>
> Sent: Wednesday, July 06, 2005 2:20 AM
> Subject: Re: Themes
>
>
> I think the framework should just provide hooks for making your own
> costumization like this relatively easy. But different projects have
> different needs, with regard to how "skinning" should work.. sometimes
> it's just css, or a client-specific logo, messaging, layout, sometimes
> it's more..
>
> I don't think the framework should enforce a particular concept of
> skinning, just facilitate implementing your approach. So if the
> modification that you suggest is indeed simple, think about instead
> what would you open up to users, to make this sort of
> framework-behavior change to be a user-space kinda thing.
>
> regards,
>   viktor
>
> On 7/5/05, Mind Bridge <mi...@yahoo.com> wrote:
> > I do think that the concept of themes has some potential problems as
well,
> > for example duplication (as do different templates that depend on the
> > locale).
> >
> > But I believe there are good reasons to have it:
> >
> > - CSS sometimes cannot achieve what is needed, for example when changes
in
> > the layout are needed
> > - Tapestry is not only for HTML. You do not have CSS in WML, for
example.
> An
> > alternative is needed.
> >
> >
> >
> > ----- Original Message -----
> > From: "Karthik Abram" <ka...@neovera.com>
> > To: "Tapestry development" <ta...@jakarta.apache.org>
> > Sent: Wednesday, July 06, 2005 12:57 AM
> > Subject: RE: Themes
> >
> >
> > >
> > > When I hear theme - I think different CSS, not different HTML. The CSS
> Zen
> > > Garden showcases the power of CSS to change layout. I don't think
themes
> > > should be an HTML-implemented feature - too expensive to
> > implement/maintain
> > >
> > > -----Original Message-----
> > > From: Mind Bridge [mailto:mindbridgeweb@yahoo.com]
> > > Sent: Tuesday, July 05, 2005 4:44 PM
> > > To: Tapestry development
> > > Subject: Themes
> > >
> > >
> > > Hi,
> > >
> > > One very frequently requested feature of Tapestry is themes, i.e. the
> > > ability to have different templates depending on the current 'theme'.
> This
> > > is very similar to the current mechanism of locales (there have even
> been
> > a
> > > number of patches), and adding it would be very small, yet the
positive
> > > effect of that step would be quite significant.
> > >
> > > Here is what I propose:
> > >
> > > Have a 'theme' property of type String (or perhaps String[]) in the
page
> > and
> > > in the engine (a la locale). The corresponding templates could then
> > become:
> > > Home$theme_en. Here the theme has priority, i.e. if the ideal template
> is
> > > not found, the framework will then search for Home$theme, then for
> > Home_en,
> > > and finally for Home.
> > >
> > > Again, this mod is realtively small.
> > >
> > > One more issue: it appears important to be able to have a mechanism to
> > > switch the locale (theme) and then proceed with rendering. This is a
bit
> > > tricky, as a different locale means a different page object and any
> > changes
> > > in the properties would be lost, but a clear mechanism for that is
quite
> > > needed. Perhaps a specialized exception?
> > >
> > > -mb
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
> > >
> > >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
>
>


-- 
The Spindle guy.           http://spindle.sf.net
Get help with Spindle:
http://lists.sourceforge.net/mailman/listinfo/spindle-user
Announcement Feed:
http://www.jroller.com/rss/glongman?catname=/Announcements
Feature Updates:            http://spindle.sf.net/updates

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org


Re: Themes

Posted by Geoff Longman <gl...@gmail.com>.
I would like to ask again... beta is feature freeze right?

The scope of the changes in 4.0 is, as usual, causing me to pull out
my hair w/respect to updating Spindle. My plate is full handling the
changes already in there.  In fact, more than full. I've set the
cutoff point for me already. I have no plans to support the new
Annotation stuff this year.

Piling more on now is not helping keep the peace w/respect to my marriage.

Geoff

On 7/6/05, Mind Bridge <mi...@yahoo.com> wrote:
> Hmm. You are very much right. I will see if I could add an implementation of
> PageSource and some other things to contrib that does that.
> 
> - mb
> 
> ----- Original Message -----
> From: "Viktor Szathmary" <ph...@gmail.com>
> To: "Tapestry development" <ta...@jakarta.apache.org>
> Sent: Wednesday, July 06, 2005 2:20 AM
> Subject: Re: Themes
> 
> 
> I think the framework should just provide hooks for making your own
> costumization like this relatively easy. But different projects have
> different needs, with regard to how "skinning" should work.. sometimes
> it's just css, or a client-specific logo, messaging, layout, sometimes
> it's more..
> 
> I don't think the framework should enforce a particular concept of
> skinning, just facilitate implementing your approach. So if the
> modification that you suggest is indeed simple, think about instead
> what would you open up to users, to make this sort of
> framework-behavior change to be a user-space kinda thing.
> 
> regards,
>   viktor
> 
> On 7/5/05, Mind Bridge <mi...@yahoo.com> wrote:
> > I do think that the concept of themes has some potential problems as well,
> > for example duplication (as do different templates that depend on the
> > locale).
> >
> > But I believe there are good reasons to have it:
> >
> > - CSS sometimes cannot achieve what is needed, for example when changes in
> > the layout are needed
> > - Tapestry is not only for HTML. You do not have CSS in WML, for example.
> An
> > alternative is needed.
> >
> >
> >
> > ----- Original Message -----
> > From: "Karthik Abram" <ka...@neovera.com>
> > To: "Tapestry development" <ta...@jakarta.apache.org>
> > Sent: Wednesday, July 06, 2005 12:57 AM
> > Subject: RE: Themes
> >
> >
> > >
> > > When I hear theme - I think different CSS, not different HTML. The CSS
> Zen
> > > Garden showcases the power of CSS to change layout. I don't think themes
> > > should be an HTML-implemented feature - too expensive to
> > implement/maintain
> > >
> > > -----Original Message-----
> > > From: Mind Bridge [mailto:mindbridgeweb@yahoo.com]
> > > Sent: Tuesday, July 05, 2005 4:44 PM
> > > To: Tapestry development
> > > Subject: Themes
> > >
> > >
> > > Hi,
> > >
> > > One very frequently requested feature of Tapestry is themes, i.e. the
> > > ability to have different templates depending on the current 'theme'.
> This
> > > is very similar to the current mechanism of locales (there have even
> been
> > a
> > > number of patches), and adding it would be very small, yet the positive
> > > effect of that step would be quite significant.
> > >
> > > Here is what I propose:
> > >
> > > Have a 'theme' property of type String (or perhaps String[]) in the page
> > and
> > > in the engine (a la locale). The corresponding templates could then
> > become:
> > > Home$theme_en. Here the theme has priority, i.e. if the ideal template
> is
> > > not found, the framework will then search for Home$theme, then for
> > Home_en,
> > > and finally for Home.
> > >
> > > Again, this mod is realtively small.
> > >
> > > One more issue: it appears important to be able to have a mechanism to
> > > switch the locale (theme) and then proceed with rendering. This is a bit
> > > tricky, as a different locale means a different page object and any
> > changes
> > > in the properties would be lost, but a clear mechanism for that is quite
> > > needed. Perhaps a specialized exception?
> > >
> > > -mb
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
> > >
> > >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
> >
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
> 
> 


-- 
The Spindle guy.           http://spindle.sf.net
Get help with Spindle:   
http://lists.sourceforge.net/mailman/listinfo/spindle-user
Announcement Feed:    
http://www.jroller.com/rss/glongman?catname=/Announcements
Feature Updates:            http://spindle.sf.net/updates

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org


Re: Themes

Posted by Mind Bridge <mi...@yahoo.com>.
Hmm. You are very much right. I will see if I could add an implementation of
PageSource and some other things to contrib that does that.

- mb

----- Original Message ----- 
From: "Viktor Szathmary" <ph...@gmail.com>
To: "Tapestry development" <ta...@jakarta.apache.org>
Sent: Wednesday, July 06, 2005 2:20 AM
Subject: Re: Themes


I think the framework should just provide hooks for making your own
costumization like this relatively easy. But different projects have
different needs, with regard to how "skinning" should work.. sometimes
it's just css, or a client-specific logo, messaging, layout, sometimes
it's more..

I don't think the framework should enforce a particular concept of
skinning, just facilitate implementing your approach. So if the
modification that you suggest is indeed simple, think about instead
what would you open up to users, to make this sort of
framework-behavior change to be a user-space kinda thing.

regards,
  viktor

On 7/5/05, Mind Bridge <mi...@yahoo.com> wrote:
> I do think that the concept of themes has some potential problems as well,
> for example duplication (as do different templates that depend on the
> locale).
>
> But I believe there are good reasons to have it:
>
> - CSS sometimes cannot achieve what is needed, for example when changes in
> the layout are needed
> - Tapestry is not only for HTML. You do not have CSS in WML, for example.
An
> alternative is needed.
>
>
>
> ----- Original Message -----
> From: "Karthik Abram" <ka...@neovera.com>
> To: "Tapestry development" <ta...@jakarta.apache.org>
> Sent: Wednesday, July 06, 2005 12:57 AM
> Subject: RE: Themes
>
>
> >
> > When I hear theme - I think different CSS, not different HTML. The CSS
Zen
> > Garden showcases the power of CSS to change layout. I don't think themes
> > should be an HTML-implemented feature - too expensive to
> implement/maintain
> >
> > -----Original Message-----
> > From: Mind Bridge [mailto:mindbridgeweb@yahoo.com]
> > Sent: Tuesday, July 05, 2005 4:44 PM
> > To: Tapestry development
> > Subject: Themes
> >
> >
> > Hi,
> >
> > One very frequently requested feature of Tapestry is themes, i.e. the
> > ability to have different templates depending on the current 'theme'.
This
> > is very similar to the current mechanism of locales (there have even
been
> a
> > number of patches), and adding it would be very small, yet the positive
> > effect of that step would be quite significant.
> >
> > Here is what I propose:
> >
> > Have a 'theme' property of type String (or perhaps String[]) in the page
> and
> > in the engine (a la locale). The corresponding templates could then
> become:
> > Home$theme_en. Here the theme has priority, i.e. if the ideal template
is
> > not found, the framework will then search for Home$theme, then for
> Home_en,
> > and finally for Home.
> >
> > Again, this mod is realtively small.
> >
> > One more issue: it appears important to be able to have a mechanism to
> > switch the locale (theme) and then proceed with rendering. This is a bit
> > tricky, as a different locale means a different page object and any
> changes
> > in the properties would be lost, but a clear mechanism for that is quite
> > needed. Perhaps a specialized exception?
> >
> > -mb
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org


Re: Themes

Posted by Viktor Szathmary <ph...@gmail.com>.
I think the framework should just provide hooks for making your own
costumization like this relatively easy. But different projects have
different needs, with regard to how "skinning" should work.. sometimes
it's just css, or a client-specific logo, messaging, layout, sometimes
it's more..

I don't think the framework should enforce a particular concept of
skinning, just facilitate implementing your approach. So if the
modification that you suggest is indeed simple, think about instead
what would you open up to users, to make this sort of
framework-behavior change to be a user-space kinda thing.

regards,
  viktor

On 7/5/05, Mind Bridge <mi...@yahoo.com> wrote:
> I do think that the concept of themes has some potential problems as well,
> for example duplication (as do different templates that depend on the
> locale).
> 
> But I believe there are good reasons to have it:
> 
> - CSS sometimes cannot achieve what is needed, for example when changes in
> the layout are needed
> - Tapestry is not only for HTML. You do not have CSS in WML, for example. An
> alternative is needed.
> 
> 
> 
> ----- Original Message -----
> From: "Karthik Abram" <ka...@neovera.com>
> To: "Tapestry development" <ta...@jakarta.apache.org>
> Sent: Wednesday, July 06, 2005 12:57 AM
> Subject: RE: Themes
> 
> 
> >
> > When I hear theme - I think different CSS, not different HTML. The CSS Zen
> > Garden showcases the power of CSS to change layout. I don't think themes
> > should be an HTML-implemented feature - too expensive to
> implement/maintain
> >
> > -----Original Message-----
> > From: Mind Bridge [mailto:mindbridgeweb@yahoo.com]
> > Sent: Tuesday, July 05, 2005 4:44 PM
> > To: Tapestry development
> > Subject: Themes
> >
> >
> > Hi,
> >
> > One very frequently requested feature of Tapestry is themes, i.e. the
> > ability to have different templates depending on the current 'theme'. This
> > is very similar to the current mechanism of locales (there have even been
> a
> > number of patches), and adding it would be very small, yet the positive
> > effect of that step would be quite significant.
> >
> > Here is what I propose:
> >
> > Have a 'theme' property of type String (or perhaps String[]) in the page
> and
> > in the engine (a la locale). The corresponding templates could then
> become:
> > Home$theme_en. Here the theme has priority, i.e. if the ideal template is
> > not found, the framework will then search for Home$theme, then for
> Home_en,
> > and finally for Home.
> >
> > Again, this mod is realtively small.
> >
> > One more issue: it appears important to be able to have a mechanism to
> > switch the locale (theme) and then proceed with rendering. This is a bit
> > tricky, as a different locale means a different page object and any
> changes
> > in the properties would be lost, but a clear mechanism for that is quite
> > needed. Perhaps a specialized exception?
> >
> > -mb
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
> >
> >
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org


Re: Themes

Posted by Mind Bridge <mi...@yahoo.com>.
I do think that the concept of themes has some potential problems as well,
for example duplication (as do different templates that depend on the
locale).

But I believe there are good reasons to have it:

- CSS sometimes cannot achieve what is needed, for example when changes in
the layout are needed
- Tapestry is not only for HTML. You do not have CSS in WML, for example. An
alternative is needed.



----- Original Message ----- 
From: "Karthik Abram" <ka...@neovera.com>
To: "Tapestry development" <ta...@jakarta.apache.org>
Sent: Wednesday, July 06, 2005 12:57 AM
Subject: RE: Themes


>
> When I hear theme - I think different CSS, not different HTML. The CSS Zen
> Garden showcases the power of CSS to change layout. I don't think themes
> should be an HTML-implemented feature - too expensive to
implement/maintain
>
> -----Original Message-----
> From: Mind Bridge [mailto:mindbridgeweb@yahoo.com]
> Sent: Tuesday, July 05, 2005 4:44 PM
> To: Tapestry development
> Subject: Themes
>
>
> Hi,
>
> One very frequently requested feature of Tapestry is themes, i.e. the
> ability to have different templates depending on the current 'theme'. This
> is very similar to the current mechanism of locales (there have even been
a
> number of patches), and adding it would be very small, yet the positive
> effect of that step would be quite significant.
>
> Here is what I propose:
>
> Have a 'theme' property of type String (or perhaps String[]) in the page
and
> in the engine (a la locale). The corresponding templates could then
become:
> Home$theme_en. Here the theme has priority, i.e. if the ideal template is
> not found, the framework will then search for Home$theme, then for
Home_en,
> and finally for Home.
>
> Again, this mod is realtively small.
>
> One more issue: it appears important to be able to have a mechanism to
> switch the locale (theme) and then proceed with rendering. This is a bit
> tricky, as a different locale means a different page object and any
changes
> in the properties would be lost, but a clear mechanism for that is quite
> needed. Perhaps a specialized exception?
>
> -mb
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org


RE: Themes

Posted by Karthik Abram <ka...@neovera.com>.
When I hear theme - I think different CSS, not different HTML. The CSS Zen
Garden showcases the power of CSS to change layout. I don't think themes
should be an HTML-implemented feature - too expensive to implement/maintain

-----Original Message-----
From: Mind Bridge [mailto:mindbridgeweb@yahoo.com]
Sent: Tuesday, July 05, 2005 4:44 PM
To: Tapestry development
Subject: Themes


Hi,

One very frequently requested feature of Tapestry is themes, i.e. the
ability to have different templates depending on the current 'theme'. This
is very similar to the current mechanism of locales (there have even been a
number of patches), and adding it would be very small, yet the positive
effect of that step would be quite significant.

Here is what I propose:

Have a 'theme' property of type String (or perhaps String[]) in the page and
in the engine (a la locale). The corresponding templates could then become:
Home$theme_en. Here the theme has priority, i.e. if the ideal template is
not found, the framework will then search for Home$theme, then for Home_en,
and finally for Home.

Again, this mod is realtively small.

One more issue: it appears important to be able to have a mechanism to
switch the locale (theme) and then proceed with rendering. This is a bit
tricky, as a different locale means a different page object and any changes
in the properties would be lost, but a clear mechanism for that is quite
needed. Perhaps a specialized exception?

-mb


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org