Welcome Guest, Not a member yet? Register   Sign In
Userguide suggestion
#1

[eluser]aart-jan[/eluser]
Hi,

I'm new to CI and I wanted to use the Template system. The included template parser is very good! But it lacks thorough documentation.
Please add this information:
http://codeigniter.com/wiki/Displaying_M...Templates/
To the userguide on the template parser. I started looking for another template system already because I thought the funcionality described on the Wiki page was not avaible.

Keep up the good work!

Edit: and another thing: maybe add some information on passing DB result to the template would be useful too.

Community members can't update the userguide by themself can they?
#2

[eluser]BoltClock[/eluser]
First off... welcome to CI Smile

The user guide is not a wiki itself, and even if it could be edited by the community then everyone with CI would have to update their local copy of the guide if they prefer referring to their local copy instead, as it comes attached with the CodeIgniter package (though personally I visit the online user guide).
#3

[eluser]Chris Newton[/eluser]
To add data to the template, isn't there already information in the guide?

says:

Code:
$this->parser->parse('blog_template', $data);

$data being whatever data you wanna pass. Since the DB call should be made in the controller, you'd assign any DB query data as an index to the $data array

$data['query1'] = yourquery;

http://ellislab.com/codeigniter/user-gui...arser.html
#4

[eluser]aart-jan[/eluser]
No I found out you have to use the result_array() function on the query result, instead of the normal result() function which is used more frequently in the docs. It is mentioned though on the bottom of the template documentation page, I just missed it.. Wink

Too bad we can't contribute to the docs, people with local copies could update once in a while so I don't see why that should be a problem...
#5

[eluser]Chris Newton[/eluser]
It's probably better for the CI team to keep the documentation vetted with approved information. Updates might be slower, but the information contained in the docs is assured to always be (at least) mostly accurate. At least there's the wiki. Could probably add this to a bug-reports, or feature request post here on the board.
#6

[eluser]aart-jan[/eluser]
Thanks, I've posted a future request. Smile




Theme © iAndrew 2016 - Forum software by © MyBB