Hi all,

Before I proceed to the question, I'll show you what I want to
achieve.  I want to create a simple and straightforward way of placing
tooltipped help icons (user hovers over a question mark icon and sees
a tooltip with a nice explanation).  To do this, I need something
like
<a href="#help_one"><img src="icon.png" /></a> somewhere within the
page
and <div id="hidden"><div id="help_one">tooltip's text</div></div>
somewhere else.

Now, I'd like to be able to simply echo $myHelper->tooltip("tooltip's
text"); to do this.  Helper's tooltip method would store the text in
some array (so that I can have multiple tooltips on a single page)
later to be printed out in layouts/defalt.ctp just before </body>.  Of
course, this method would also return the html with linked image.

Now... how should I _properly_ store that information that's going to
be printed out later on in layouts/default.ctp?  I could use a global
variable, but it doesn't look pretty.  I'm sure there's a nicer way of
doing it.

Sorry if it doesn't belong to CakePHP mailing list at all... Cake
introduced me to OOP and I'm still not very comfortable with it.

cheers,
muszek - Mateusz Mucha
http://www.muszek.com

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to