Also (may be related), in the element, why doesn't the following work?

<?php
echo $html->css(array(
        "element.site_search"
), null, array(), false);
?>

(the CSS file isn't being linked in the head)

It works if the last param is true, but the code is embeded in the
page and not the head.

On Aug 24, 11:27 am, RichardAtHome <[EMAIL PROTECTED]> wrote:
> I have a simple element:
>
> site_search.ctp:
> <?php echo $form->create("Search") ?>
> <?php echo $form->inputs() ?>
> <?php echo $form->end("Search") ?>
>
> Model Search is a tableless model which I manually create the schema
> for:
>
> search.php:
> class Search extends AppModel {
>
>         var $useTable = false;
>
>         var $_schema = array(
>                 "search_for"=>array(
>                         "type"=>"string",
>                         "length"=>128
>                 )
>         );
>
> }
>
> Problem: The inputs() call in the element is coming back blank. It
> works fine if I point the form at a model (ie. it generates the
> inputs) with a real database table behind it, but not for one with a
> $_schema.
>
> I tried adding:
>
> App:Imort("model", "Search");
>
> to the element, but that didn't help.
>
> How do I get an element to 'see' a model in this way?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to