1 (edited by stradfred 2012-04-17 06:41:03)

Topic: include theme variable in header

I make a new theme and i view in header file the include:

<?php Stylesheet::add('public/themes/defaut/css/style.css'); ?>

It possible to get also:

<?php Stylesheet::add('css/style.css'); ?>

public/themes/defaut/ is storage in config variable for detect the theme select.

Edit: How to load more css files ?, I tested with:

        <?php Stylesheet::add('public/themes/defaut/style.css','public/themes/defaut/css/skin.css'); ?>
        <!--[if IE 7]><?php Stylesheet::add('public/themes/defaut/css/ie.css'); ?><![endif]-->

But in the code source  if want load manually http://localhost/monstra/tmp/minify/frontend_site.minify.css, i get a 404.
Sorry for my little  english.

Sorry for my little english sad

Re: include theme variable in header

How to load more css files ?

add them

Stylesheet::add('path/to/my/stylesheet1.css');
Stylesheet::add('path/to/my/stylesheet2.css');
Stylesheet::add('path/to/my/stylesheet3.css');

and load them

<?php Stylesheet::load(); ?>
Monstra Loves You! Give some love back!

Re: include theme variable in header

include theme variable in header:

No. Because header-guards are for preprocessing phase. That is to tell compiler that this part has been already included and do not include it once again. But our multiple definition error comes in the linker part - much after the compilation.

This whole thing has got me confused about how preprocessing & linking work. I thought that preprocessing will just not include the code, if the header guard symbol has been defined. In that case, shouldn't multiple definition of a variable problem also get solved?

What happens that these preprocessing directives save the compilation process from redefining symbols under header guards, but the linker still gets multiple definitions of the symbol?

Re: include theme variable in header

moonar, what are you talking about ?

Monstra Loves You! Give some love back!