Codegen a treenav draft class

thread: 2 messages  |  last: a year ago  |  started: friday, april 9, 2010, 9:26 am pdt


#1  |  Stéphane Ligozat (Paris) France Financial Contributor
Friday, April 9, 2010, 9:26 AM PDT

Hello,
I get a template (in db_orm/draft) to codegen a TreeNav draft class for parent/child columns, for the moment I test in the template if such a column exists, witch is silly because it produce empty files for non parent/child tables !
Is it possible by overriding something in CodeGen to select a template for a table according to a condition ?

#2  |  Mike Ho (Sunnyvale, CA) United States of America Qcodo Administrator
Monday, April 12, 2010, 2:35 PM PDT

There is currently no straightforward way of doing what you are suggesting...

An alternative approach would be to implement your TreeNav class as a subtemplate which could be generated within something like the MetaControl or something like that.  That way, the code for the TreeNav class will only show up if your condition holds true.



Copyright © 2005 - 2012, Quasidea Development, LLC
This open-source framework for PHP is released under the terms of The MIT License.