thnks nate your solution work

in my controller
$this->set('imageT','imageTest.gif';

in my thtml
  <?php echo $html->image($imageT); ?>


On 5 mar, 11:11, "jamiro" <[EMAIL PROTECTED]> wrote:
> Hi again,
>
> In my case i have 3 elements :
>
> /*1.thtml:*/
>  <?php echo $html->image('imageTest.gif'); ?>
> /*2.thtml:*/
> <?php echo $html->image('imageTest.gif');  ?>
> /*3.thtml:*/
> <?php echo $html->image('imageTest.gif');  ?>
>
> I try this
> /*config.php*/
>   $imageT=$html->image('imageTest.gif');
> and now:
> /*1.thtml:*/
>  <?php echo $imageT; ?>
> /*2.thtml:*/
> <?php echo $imageT;  ?>
> /*3.thtml:*/
> <?php echo $imageT;  ?>
>
> I use "include ('config.thtml')", and work!...
> but I do not believe that it is the best form, some other form to
> solve this problem?
>
> thanks!
> PS: in elements set not work
>
> On 2 mar, 17:07, "nate" <[EMAIL PROTECTED]> wrote:
>
> > The solution is to set your variables in the controller with $this-
>
> > >set().  In Cake 1.2 you can also use $this->set() in views.
>
> > On Mar 2, 4:17 pm, "jamiro" <[EMAIL PROTECTED]> wrote:
>
> > > hello, I need a solution to this problem,
> > > I have a file config.php:
> > >  <?php $x="test"; ?>
>
> > > I have a file page.thtml
> > > <?php echo renderElement('config'); ?>
> > > <?php echo $x ; ?>
>
> > > result:
> > > Notice: Undefined variable: x in /var/www/html/
>
> > > Also I test with :  vendor('config'); not work
>
> > > PS: Using include('config.php'); it works but there is no another
> > > solution? thanks


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to