The file should be at: app/View/Themed/corporate/webroot/css/main.css
Is that the case? On Sat, Sep 29, 2012 at 11:10 AM, hill180 <[email protected]> wrote: > For the first time, I have to use themes in a project. > > I am using Cakephp 2.1 > > In the before filter of the app controller I have the following: > > $this->theme = 'corporate'; > > I have the views under > > app/view/themed/corporate/layout/default.ctp > > This is working fine.. > > My problem is the webroot. > > I used > > //main.css is under webroot/themed/corporate/css/main.css > <?php echo $this->Html->css('main'); ?> > > > The page is rendered with: > > <link rel="stylesheet" type="text/css" href="/css/main.css" /> //file not > found > > I can manually put in the link > > <link href="<?php echo $this->webroot; ?>themed/corporate/css/main.css" > rel="stylesheet" type="text/css" /> > becomes > <link href="/themed/corporate/css/main.css" rel="stylesheet" type="text/css" > /> //good > > > > I thought when I used the HTML helper it was supposed to properly identify > the theme and update the link accordingly. > > Am I wrong in that assumption? > > Thanks! > > > -- > Like Us on FacekBook https://www.facebook.com/CakePHP > Find us on Twitter http://twitter.com/CakePHP > > --- > You received this message because you are subscribed to the Google Groups > "CakePHP" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > Visit this group at http://groups.google.com/group/cake-php?hl=en. > > -- Like Us on FacekBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. Visit this group at http://groups.google.com/group/cake-php?hl=en.
