Yii Framework Forum: Using Templates/layouts - Yii Framework Forum

Jump to content

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

Using Templates/layouts Rate Topic: -----

#1 User is offline   -Tom-Tom- 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 2
  • Joined: 02-December 12

Posted 02 December 2012 - 03:02 PM

Hello,

im new with Yii. Before i programmed my webpages with Joomla CMS or without an cms or framework.

For my first Project i want to create a website with frontend and backend.
But there I have an understanding-problem.

Where are the differents between an template (in root/themes/) and an layout (in root/protected/views/)?


From Joomla i know it in this way:
In one directory you have an template.
In a second directory you have your webpages which would be rendered in $contend.
Why did you have pages in the template directory?

Can you help me?
0

#2 User is offline   yiqing95 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 585
  • Joined: 27-December 10
  • Location:china

Posted 02 December 2012 - 09:07 PM

refer here theming

for short :
layout is used for different views of your project , if you have multi modules you can use different layout for each module .(module can think as a subSite )

but theme can be used for different lookAndFeels of you whole application !

:lol:
0

#3 User is offline   -Tom-Tom- 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 2
  • Joined: 02-December 12

Posted 03 December 2012 - 03:17 PM

Yes, i knew this Link and i already read it.

But i still don't understand.

Where are the differents between Layout and Theme.
and in which context stands it with the modules?

From CakePhp i knew you has your Pages and in an other directory you have your Themes. It's linke skin's for your pages.
In Yii you have your pages in the View (Layout)-Directory and in the Themes directory ... :(

Sry i found out, that this is only the half truth ...
To learn i downloaded some themes, to have a look, and sometimes there are pages in the theme, sometimes the theme renders the pages vom the system.

I'm confused :unsure:

Sry for my bad english
0

#4 User is offline   mbi 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 602
  • Joined: 08-May 09

Posted 03 December 2012 - 05:09 PM

a layout in yii is like the index.php of a joomla template, where you can define all positions of your site
a viewfile of a theme in yii can override a default view
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