Template library gets Documentation

Posted: 2010-10-25
Category: CodeIgniter

People have always said my Template library for CodeIgniter is powerful but f**king confusing. Well now I have written up some documentation, which anybody who knows me or my work is VERY unusual...

Documentation

Now if you'll excuse me, I have a doctors appointment.

Comments

Gravatar
Hassan

2010-10-25

Awesomeness.

Gravatar
????

2010-10-26

You've made a typo in the codeigniter-dwoo link, at the bottom of the page.
Great job, thanks.

Gravatar
Fawad Hassan

2010-10-26

Thanks for the docs :)

Gravatar
Michalsn

2010-10-26

One thing. In documentation links for mobile and module page are switched.
Sweet.

Gravatar
Lucas Alves

2010-10-26

It's amazing!

Gravatar
Brady

2010-10-26

Thank you!

On http://philsturgeon.co.uk/demos/codeigniter-template/user_guide/library.html#title there's a typo, the closing kbd tag is typed as /kdb

Gravatar
Ahmed

2010-10-27

Thanks Phil , library documentation now very good , I’m facing problems when using Template library with wiredesignz "Modular Extensions - HMVC version 5.3" when try to use $this->template->set_layout('default');
I’m getting error "An Error Was Encountered Unable to load the requested file: default.php "

I tried
-application
-system
-themes/themename/views/layouts/default.php
-index.php


and

themes/themename/views/default.php

and

application/modules/modulename/views/layouts/default.php

and

application/modules/modulename/views/default.php


and

application/modules/modulename/views/themename/layouts/default.php

all same error

is there is special configuration need when using "wiredesignz Modular Extensions" ?

also when trying

$this->template->set_theme('default');
$this->template->enable_parser ( FALSE ); // default = TRUE

no errors i think this mean the library can see the template path


plz help

thanks again and regards

Gravatar
Ahmed

2010-10-27

I forgot to say I’m using latest CI 2.0 & Template library 1.6.3

and is there is any way to make this error message readable I mean instead of saying "An Error Was Encountered Unable to load the requested file: default.php "
it should be
"An Error Was Encountered Unable to load the requested file: default.php
expect file path themes/themename/path to file"

Gravatar
Phil Sturgeon

2010-10-27

You're using 1.6.3? That's impressive, I've only just released 1.6.0. Layouts don't go in modules, they go in the the main application/views/layouts/ or applications/themes/views/layouts/.

Gravatar
Ahmed

2010-10-27

yes it's saying philsturgeon-codeigniter-template-v1.6-3, :D

http://github.com/philsturgeon/codeigniter-template/archives/master

I thought "3" is belong to version no and it's came after you fixed documentation links and upload missing files ;)

I got the problem my mistake was putting themes folder outside application folder

thanks Phil

Gravatar
Hayden

2010-10-29

Hi Phil

Just a Heads-Up ... the link in your doccumentation to the codeighniter-dwoo Parser extension throws a 404.

See: NOTE: You can only use the Parser if you have also installed a Parser extensions like codeigniter-dwoo. This is because CI_Parser does not play nicely with arrays.

Cheers,

Hayden

Gravatar
Daniel Gómez Didier

2011-02-20

When you try to pass a single object to a view you get the following error:

Object of class stdClass could not be converted to string

But as soon you wrap the object in to an array everything work fine.

The problem is present when you use
$data[single_obj] = $this->a_model->get_single(); $this->template->build('some_view', $data); or

$this->template->set('single_obj', $this->a_model->get_single() ); $this->template->buil('some_view');

Thank you.

This library is great.

Gravatar
Dung Vu

2011-06-23

I have try:
Please help write example project using templae. all Path and folder place??

thanks!

Gravatar
Gofrendiasgard

2011-08-30

Thank you Phill, I once downloaded pyrocms and was spent days to know how the themes worked for addons,.... Now I search for a good template library which support HMVC. Your documentation should help a lot,......

Gravatar
Júnior Messias

2011-10-10

Page missing

Gravatar
Assoft

2012-02-22

Hi Phil

I have a problem please help me!

System:
-------------
Codeigniter v2.1.0
Modular Extensions - HMVC version 5.2
Template Library
-------------

if use "modules::run('module/method')" with error message:
-------------
Unable to load the requested file: view_file.php

controller:
-------------
function index()
{
//$this->load->view('view_file');
$this->template->build('view_file');
}

view_file:
-------------
<?php echo modules::run('test_module/test_method');?>


Thank you.

Gravatar
Michael Spivack

2012-03-08

Hello Mr Sturgeon,
I'm using your template library. I think it's great. I went to check out the documentation again today, and I noticed I now get a 403 error when I try to do this. I would really, really like to view the documentation here. It there something I am not doing correctly, please let me know. And thank you for your time.

Regards,
Mike S.

Gravatar
Isaac Zepeda

2012-12-03

Link is broken :(

Posting comments after three months has been disabled.