Yii Framework Forum: change layout for certail actions - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

change layout for certail actions Rate Topic: ***** 1 Votes

#1 User is offline   ravin 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 8
  • Joined: 26-December 13
  • Location:Gujarat

Posted 25 May 2015 - 05:22 AM

i have created customer theme for my website with two different layouts main and cart. I need to use layout cart on certain actions and it works fine on my local system. i have used the following code to apply layout cart.

function actionCheckout(){
$this->layout = "cart";
}

but, when i run the same code on live (Cent OS), it does not work, i means the cart layout does not apply.
0

#2 User is offline   SiZE 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 68
  • Joined: 01-October 13

Posted 25 May 2015 - 02:10 PM

Check paths and access.
0

#3 User is offline   sirius 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 22
  • Joined: 12-October 11

Posted 26 May 2015 - 11:34 AM

View Postravin, on 25 May 2015 - 05:22 AM, said:

i have created customer theme for my website with two different layouts main and cart. I need to use layout cart on certain actions and it works fine on my local system. i have used the following code to apply layout cart.

function actionCheckout(){
$this->layout = "cart";
}

but, when i run the same code on live (Cent OS), it does not work, i means the cart layout does not apply.



Check if you have uploaded all the views. When you have specified a theme, Yii first looks for the view in the theme folder and if not found, then will load the default view.
0

#4 User is offline   ravin 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 8
  • Joined: 26-December 13
  • Location:Gujarat

Posted 29 May 2015 - 06:53 AM

View Postsirius, on 26 May 2015 - 11:34 AM, said:

Check if you have uploaded all the views. When you have specified a theme, Yii first looks for the view in the theme folder and if not found, then will load the default view.


thanks for the response. the issue was with the file name case sensitivity (Cart).
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users