Yii Framework Forum: Integrate Yii With Plain Html And Jquery? - Yii Framework Forum

Jump to content

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

Integrate Yii With Plain Html And Jquery? Rate Topic: -----

#1 User is offline   reptildarat 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 19
  • Joined: 17-October 11

Posted 19 April 2013 - 02:23 AM

Hello, I'm new in Yii.
I already build a plain HTML with bootstrap wizard, jquery validation and other things that i build purely in Html and Jquery (of course there's no AJAX).
Now i want to integrate Yii with my custom build HTML. And i mean to integrate is, as simple as CRUD operation.
How to achieve this?

Thank you for your help.
0

#2 User is offline   bettor 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 751
  • Joined: 02-February 09

Posted 19 April 2013 - 02:45 AM

Now generally speaking you should create a webapp with Yii and copy your html over to the Yii's layout and views.
it is all located in protected/views. Read more about views and layouts here: http://www.yiiframew.../en/basics.view

For creating your first application read here: http://www.yiiframew...start.first-app

Try your way through and ask if you hit into any errors
0

#3 User is offline   reptildarat 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 19
  • Joined: 17-October 11

Posted 19 April 2013 - 03:08 AM

View Postbettor, on 19 April 2013 - 02:45 AM, said:

Now generally speaking you should create a webapp with Yii and copy your html over to the Yii's layout and views.
it is all located in protected/views. Read more about views and layouts here: http://www.yiiframew.../en/basics.view

For creating your first application read here: http://www.yiiframew...start.first-app

Try your way through and ask if you hit into any errors


Thank you for your answer bettor,
maybe I'm not specific enough for now. but i have some question in my mind now, I see that Yii will be generate this code from CActiveForm:
 <input id="UserDetail_Birth" name="UserDetail[Birth]" class="m-wrap span12" type="text" placeholder="Date Birth..." readonly>

And my question is:
do i need using the Yii "id" and "name" convention as Yii generate?

my goal is simple, i don't want to use the Yii build engine template and replace that with my own template, and then integrate that with the model and controller in Yii.
0

#4 User is offline   bettor 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 751
  • Joined: 02-February 09

Posted 19 April 2013 - 03:44 AM

It depends on how you are planning to handle the CActiveForm in your controller later on. If you would like to mass assign your attributes to a model then I suggest you stick with Yii default name. But to answer your question no you don't have to stick with Yii way of naming 'id' and 'name' attributes. May be if you provide a use case scenario it will be much easier to answer questions
1

#5 User is offline   softark 

  • Keep It Simple
  • Yii
  • Group: Moderators
  • Posts: 2,063
  • Joined: 16-February 11
  • Location:Japan

Posted 19 April 2013 - 09:46 AM

Hi reptildarat,

Generally speaking you would be better throw away the current development style of your own (at least for the moment), if you ever want to maximize the benefit of using Yii.

I don't think it's easy to cherry pick the goodies of Yii into your, say, homemade framework. It's because Yii is not a library but a framework.

Instead, try to comprehend the way Yii works and accustom yourself to it. Then you will find a way to utilize your knowledge about HTML, bootstrap and jQuery ... in fact it will surely help you make a good app with Yii.
1

#6 User is offline   reptildarat 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 19
  • Joined: 17-October 11

Posted 20 April 2013 - 01:00 AM

Thank You all,

Your suggestion is very helpful... :rolleyes:
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