Theme inheritance, is it possible?

I have a basic theme, that holds the core of the website layout.

I imagined child themes, that only change some of the structure. So theme inheritance would be the best to handle, and override just what I actually want.

Is this possible in Yii?

It depends on what does you mean with inheritance.

I usually adopt this method:

Once the work is done, I prepare a main version of css file, removing all color, background and border color.

This create a "naked" theme.

Then, all themes supplies the color, background images and so on.

With this method, the theme will not change any positioning, only colors.

This can be achived with simple controls that include the proper css, or creating a small view file only for css in order to use the view loading system of yii.

It’s not just the css I want to override. There maybe layout files for certain pages structured differently.

For that there is the theme system of yii.

Take a look here, you can override views with theme.

For have inheritance you should prepare some "masterView" and then include this masterview.

Anyway, views are plain html+php tags, they are not object and so cannot be extended, I cannot guess how you want to do some theme herarchy.

Can you explain a simple task of this process, in order to have something of concrete on wich think?

i want to modified HTML+CSS both after applying theme(without CSS) what i have to do for that…i also want to change the data {echo $content; and header+footer}in themes\test\views\layouts\wrappers\main.php

Take a look at the guide here.

The theme machine of yii is perfect for this pourpouse: you can override the view file by putting a view with the same name in the folder of the theme.

Is more siple trying that explaining, just follow the guide.

I want to override my ImportController to work differently for a specific theme/configuration.

How can I do this?

First you can check Yii::app()->theme->name for know in which theme you are.

Also you can use the view overriding system embedded in yii.

I am talking about Controller not about view overriding.