DMZ: HTML Table extension (contributed). DMZ 1.7+ |
[eluser]Oblique[/eluser]
(Now with _iterated support) ATTENTION: this extension is third-party, so don't bother Phill with questions about it. Features are: - well documented - label from $validation / custom label - mapping by $validation[‘field’][‘values’] / custom array mapping - custom callback-generated fields - autopagination with native CI paginator when _paged - table elements attributes assigned automaticaly This extension works in the similar way as original HTML Form extension. All it does is provide render_table() method that builds html code based on settings given by user. It can save some time for you and make table-generation part of the view more readable. Extension is shipped with two table templates: object_per_row and object_per_column. Docs are included in Distrib. Installation: To make HTML Table available, copy application folder’s content from distrib into your application folder. WARNING! If you have your own MY_html_helper, be careful not to rewrite it with same file from this distrib, just append your own with it’s content. MY_html_helper contains one single function wrap() that makes output of optional parts of page more convinient. It’s used in table templates.
[eluser]Eason[/eluser]
Gosh! I just finished a DMZ extension based on nearly the same idea. I named my extension as htmllist.
[eluser]Oblique[/eluser]
Yeah. Actually it was very strange that noone had posted such an obvious ext for so long time. Now i'm finishing docs for an upgraded version. May i look at yours? )) Maybe we can work together or smth )
[eluser]Daniel H[/eluser]
Nice extension! Thanks! I'm having some problems with toString and getting it to return the name of the relationship. Accounts and Groups have a field called "name", so in my models I have this: Code: public function __toString() However when executed, this error is returned Code: Message: Method Group::__toString() must return a string value Same with Account. And I am making sure I am included the related accounts and groups Code: $users->include_related('group', array('name')); Any ideas?
[eluser]Oblique[/eluser]
By executed do you mean you call ->render_table() ? Please post here code snippet causing error.
[eluser]Daniel H[/eluser]
This is the code. Code: $users = new User();
[eluser]Oblique[/eluser]
Looks like you include related fields without instantiation, (read include_related docs) so when render_table() tries to access $users->group group has no "name" property and it's set to null or smth. So your $scheme should containt something like ... 'group_name' => 'Group' 'account_name' => 'Account' ...
|
Welcome Guest, Not a member yet? Register Sign In |