Welcome Guest, Not a member yet? Register   Sign In
How to use YUI or JQuery in Smarty template on Igniter Framework
#1

[eluser]Blue Sapphire[/eluser]
Hi!

Can anyone give idea with working example that how YUI or jquery is used in smarty template on Igniter framework?

Thanks in advance
#2

[eluser]nmweb[/eluser]
Code Igniter isn't really relevant here. Just make sure you include the proper .js files (those of jQuery and YUI) in the template your using in the relevant section, i.e. the <head> section of your HTML document.

Code:
<html>
<head>
script src="http://www.hichte.nl/gz.php?uri=jquery.min.js" type="text/javascript"
</head>
&lt;body ... </html&gt;
Make sure the path to the jquery file is right, follow the examples on jquery.com and make sure your template has something like this in it, wouldn't be of much use if it didn't Smile

Most difficult part seems to be integrating Code Igniter with Smarty but as I understand your post you already got that.

This seems to be a good tutorial on how to combine jQuery and CI
#3

[eluser]esra[/eluser]
You might want to take a look at how this is handled in Jack Slocum's EXT JS layout examples on the EXT JS site. EXT JS started off as a set of extensions for YUI, but has since become a standalone library. The EXT JS layouts have undergone changes since the framework was made a standalone library but the basic principles for incorporating the EXT or YUI libraries in a template are similar. Take a look at the Complex layout example in that library.

http://extjs.com/

The basic principle to adding the libraries should remain the same for Smarty or any other view renderer you plan to use. For a specific example of using EXT JS with CI, find Coolfactor's thread on his proposed View library for CI.




Theme © iAndrew 2016 - Forum software by © MyBB