[EXTENSION] Foundation

Forum Post discussion for the Yii Foundation extension

well done! :lol:

a good start for introducing another framework to yii ( this may become the competitor to bootstrap !)

great!!!! :lol:

B) especially : http://foundation.oakwebdev.com/index.php?r=site/ui

I approve of this extension! :lol:

I had to add:

‘import’=>array(

'ext.foundation.components.*',

in order for it to work for me.

Are you sure you have


'preload'=>array(

    .....

    'foundation', // preload the foundation component

),

In your config?

Great work!

Am I right in saying this is almost drop in compatible with Chris83’s bootstrap extension?

Well this extension is heavily inspired by his. but foundation and bootstrap themselves have notable differences.

well then,

in new release of foundation ext, how to use NavBar and SubNav?

There are examples in the online docs

Here is one:


<?php

$this -> widget("foundation.widgets.FounNavBar", array('items' => array(

    array('label' => 'Nav Item 1'),

    array('label' => 'Nav Item 2', 'flyout' => array('small', '<h5>Small Example (200px)</h5>

    <p>

        This is example text. This is example text. This is example text. This is example text. This is example text. This is example text. This is example text. This is example text.

    </p>')),

    array('label' => 'Nav Item 3', 'flyout' => 'content...'),

    array('label' => 'Nav Item 4', 'flyout' => array(

        'large right',

        'content...', true

    )),

)));

?>

Yaps…my Friends… i dont realize that http://foundation.oakwebdev.com/ is the Foundation Yii-Extension Demo site. Very similiar with it’s original website. I really surprise, that it’s already there… shame on me…but thanks anyway…

Hey there,

I am using your extension and I am really happy with it so far! Thanks for the good job!

One question though … I havn’t seen a passwordFieldRow yet, any plans on that?

Cheers

-Seb

It misses SubmitButton too… the project seems blocked since 1 month :(

eeh.,… im still a live :D, just kindda busy T_T

Ill try to get you guys an update this weekend. hail Yii!

BTW, this is the best news :)

Is it possible to help you with your project? For example, how to create password input and submit one?

For sure!

the project its hosted on github, just fork it! https://github.com/Asgaroth/foundation

Hi, guys,

Asgaroth, thank you very much for the extension.

Has anybody implemented the password field yet?

:)

Thanks

Ooops, answer my own question, password field is implemented on git. :) - thanks

I would like to suggest the following to improve the extension, I’ve made these changes to fit my needs and thought it could be useful to others:

  • option to register app.css file or even a custom app.css file (see code below)

  • make registerJs() method public (why? - because sometimes I just want to force registering js files and sometimes in specific places)

  • register Js files with POS::END option

  • change the text in comments Registers the Foundation CSS instead of Registers the Bootstrap CSS

Foundation.php




	/**

	 * @var boolean whether to register the Foundation app CSS (app.css) or another file

	 * Defaults to true, but only registers if coreCss is also true

	 */	

	public $appCss = true;




And the code




	/**

	 * Registers the Foundation CSS.

	 */

	public function registerCss() {

		Yii::app() -> clientScript -> registerCssFile($this -> getAssetsUrl() . '/stylesheets/foundation.css');

		if($this->appCss):

			if(is_bool($this->appCss))

				Yii::app() -> clientScript -> registerCssFile($this -> getAssetsUrl() . '/stylesheets/app.css');

			else

				Yii::app() -> clientScript -> registerCssFile($this->appCss);

		endif;

	}




	/**

	 * Registers the core JavaScript plugins.

	 * @since 0.9.8

	 */

	public function registerJs() {

		Yii::app() -> clientScript -> registerCoreScript('jquery');

		Yii::app() -> clientScript -> registerScriptFile($this -> getAssetsUrl() . '/javascripts/modernizr.foundation.js',  CClientScript::POS_END);

		Yii::app() -> clientScript -> registerScriptFile($this -> getAssetsUrl() . '/javascripts/foundation.js',  CClientScript::POS_END);

		Yii::app() -> clientScript -> registerScriptFile($this -> getAssetsUrl() . '/javascripts/app.js',  CClientScript::POS_END);

	}




I’m pretty sure somebody has a good approach to do this or even better idea. This is only my two cents trying o improve this excellent extension!

:)

Best regards!

@Junior - df9

I just uploaded a new version added most of the recommendations except for the app.css which is not something that belongs to the application and not the extension, it is there only because it belongs to foundation it self, I might remove it latter (I should have now but I forgot to xD).

You are not supposed to edit any extension files, instead create an app.css in your CSS folder and include it manually.

Thanks for your feedback!

@Asgroth

You’re right about app.css.

Thank you very much for applying the changes, I’ve already downloaded the new version. :)

Best regards!