Yii Framework Forum: Site Pages Controller - Yii Framework Forum

Jump to content

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

Site Pages Controller Rate Topic: -----

#1 User is offline   Rapture 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 10
  • Joined: 07-November 12

Posted 28 October 2013 - 04:11 AM

Hi at all..

I have a problem... How can I create a controller for the pages that there are in the site directory?

/home/username/workspace/testdrive/protected/views/site/contact.php
/home/username/workspace/testdrive/protected/views/site/error.php
/home/username/workspace/testdrive/protected/views/site/index.php
/home/username/workspace/testdrive/protected/views/site/login.php

How can I do it?

Thank you...
0

#2 User is offline   nineinchnick 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 614
  • Joined: 12-September 11
  • Location:Bialystok, Poland

Posted 28 October 2013 - 10:39 AM

There should be a SiteController already that uses those views.

I invite you to read the official guide.
Don't be a dick.
0

#3 User is offline   Rapture 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 10
  • Joined: 07-November 12

Posted 28 October 2013 - 11:22 AM

Hi!

Thanks...

I know about SiteController... but I thought I shouldn't touch it... I don't know why...

I have read a lot... but is difficult for me now...
0

#4 User is offline   Shahcheraghean 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 478
  • Joined: 12-December 12
  • Location:Mashhad, IRAN

Posted 28 October 2013 - 11:33 AM

Also, Yii presented a tools, named Gii. It is used for generating model, controller, CRUD and modules in Yii too easy.
www.shgn.ir
www.shgn.ir/yii-framework/
yii2.swsco.ir
In a world without any fences or walls,Who needs Gates or Windows!
0

#5 User is offline   MistaMoh 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 15
  • Joined: 23-August 13

Posted 28 October 2013 - 05:26 PM

You can copy/rename the default controller and copy its views.
You can also change default controller to this copy of yours (instead of site).
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