Welcome Guest, Not a member yet? Register   Sign In
Ocular 2.0 - Template Library for CI with mobile templating
#1

[eluser]kilishan[/eluser]
I know that a number of you have used Ocular before. Well, after bumping into a couple of design headaches with it, I rewrote it. It's much more focused now on what it should be doing: rendering the page as simply, powerfully, and flexibly as it can. Here's the highlights of the new version:

Block-based Layouts Rendering of partials is best handled by CI's own views, so it uses Blocks instead. These are a more flexible version of views, where a default view can be set if none exists, but can be overridden. This allows you to setup a single layout to handle your entire site.

Theme Engine that will check the user agent and allow you to specify any number of Themes to be used for specific user agents. For example, you can specify 'Apple iPhone, Apple iPod Touch' to render a 'iphone' theme. Ocular searches for the view first in your specified theme, and, if it doesn't exist, falls back to the default theme. You can use this to create multiple themes for your site also.

Extension Handling allows you to specify any number of file extension types for your views. This allows you to write your views in Mardown, or Textile and have it converted to HTML automatically. You could also use this system for custom filtering of the text before display (bad words filter, etc).

Auto-Loading Views still works the same way - views are loaded based on the controller/function being called.

Ajax check (thanks to Jamie's wonderful code) that tells you if the request was made through an AJAX call or not.

and more...

Full documentation is not available yet, but I'll be working on it daily. The source code is thoroughly commented, though, and it should be relatively easy to get going with it.

If you've used Ocular in the past, please note this is NOT a drop-in replacement for the 1.x versions, and is not recommended as a replacement in existing applications.

Matchbox and HMVC users: Ocular does not directly support you, though I tried to make it as painless as possible. It should just require a very small change to your Loader.php files to get them working together, and the change is clearly marked in the MY_Loader.php file that ships with Ocular.

Learn more and download here at http://igniteyourcode.com/ocular


Messages In This Thread
Ocular 2.0 - Template Library for CI with mobile templating - by El Forum - 12-16-2009, 12:14 AM



Theme © iAndrew 2016 - Forum software by © MyBB