I can see the time and place for something like PHPQuery, but
seriously:
// Create DOM from string
$html = str_get_html('<div id="hello">Hello</div><div
id="world">World</div>');
What possible benefits are there for declaring entire pages like this?
You'll have escaping issues, you'll always have a harder job
integrating other peoples designs, or allowing less technical people
to make minor changes.
I implore you, don't do it! The very idea gives me nightmares :)
On Sep 3, 12:18 pm, Donkeybob <[EMAIL PROTECTED]> wrote:
> cake has a built-in template system . . . .why change it? Seems like
> more work if you're using the framework anyways.
>
> On Sep 3, 4:54 am, mariuz <[EMAIL PROTECTED]> wrote:
>
> > In views i can use smarty or fasttemplate or any other template
> > language but i'm not quite atracted about any of
> > themhttp://www.qadram.com/vcl4php/docwiki/index.php/Component_Writer%27s_...
> > I wonder what if i use no template engine at all and keep the html
> > separated and clean
> > and use an simple dom parser for html "templates" or files
>
> >http://simplehtmldom.sourceforge.net/andmodify the html dom
> > structure
>
> > // Create DOM from string
> > $html = str_get_html('<div id="hello">Hello</div><div
> > id="world">World</div>');
>
> > $html->find('div', 1)->class = 'bar';
>
> > $html->find('div[id=hello]', 0)->innertext = 'foo';
>
> > echo $html; // Output: <div id="hello">foo</div><div id="world"
> > class="bar">World</div>
>
> > or with jquery phpQuery - jQuery port to
> > PHPhttp://code.google.com/p/phpquery/
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---