<< to each [{include file="template"}] we have added a smarty modifier
[{include file="template"|tc_include}] that looks into tcTemplates and
return the new template. i think that a solution based on an array is more
cleaner and faster -> no look into file-system.>>

So you will also love template-updates....

To complicate things further, I have a third approach to this...

I have subclassed Smarty and I am checking in the "fetch"- and
"include"-Routines if an alternative version of the resource exists.

But I am doing this checking only once in an session, storing the
information on the resource in the $_SESSION, like
$_SESSION['override_template'][$resource_name]=$override_template_exists.

So I need to access the file-system only once per Session for each resource
and I do not need to fiddle around with the template-files further...

-----Ursprüngliche Nachricht-----
Von: [email protected]
[mailto:[email protected]] Im Auftrag von Sven Tietje
Gesendet: Montag, 2. November 2009 12:08
An: [email protected]
Betreff: [oxid-dev-general] sCustomTheme

hi oxid-dev-team,

congratulations to oxid 4.2.0! many cool improvements and features. the idea
of sCustomTheme is nice, but somehow quite dirty: so many looks into
file-system. the normal sTheme is somehow a fallback for templates that are
not located in the sCustomTheme. if you just want to extend one file, i
think i do not have to explain any more ...:)

we have implemented a nearly "similar" solution some days before. i think
it`s more performant and clean. in the config.inc.php we just have added an
array:

$this->tcTemplates = array(
        'path/to/overwrite/template' => 'new/location'
);

to each [{include file="template"}] we have added a smarty modifier
[{include file="template"|tc_include}] that looks into tcTemplates and
return the new template. i think that a solution based on an array is more
cleaner and faster -> no look into file-system.

perhaps, we can combine our solutions?

of course, it`s no problem to make our solution open source :)

sven


_______________________________________________
dev-general mailing list
[email protected]
http://dir.gmane.org/gmane.comp.php.oxid.general

_______________________________________________
dev-general mailing list
[email protected]
http://dir.gmane.org/gmane.comp.php.oxid.general

Reply via email to