Page 1 of 1

How to use mailto component ?

Posted: Wed Jun 22, 2011 3:53 pm
by stepson
I want to add a "suggest to your friend link" in a few pages of my component, like we can see it on articles.

how to do this ? i do not find documentation about the mailto component usage.
how to create in my component the button that will popup the "suggest to your friend" link ?

Re: How to use mailto component ?

Posted: Wed Jun 22, 2011 5:24 pm
by stepson
i look at the code in com_content .... article/views/tmpl/default.php

there is this part of the code :

<?php if ($params->get('show_email_icon')) : ?>
<li class="email-icon">
<?php echo JHtml::_('icon.email', $this->item, $params); ?>
</li>
<?php endif; ?>

but a lot of things have to be done before I think as if i add it in my own default.php in my component it does not work.
it seems that i need to create an helper folder and copy there icon.php, and that i need to instantiate item and params in my view.html.php file too...

does some of you knows a simple tutorial on this ?

Re: How to use mailto component ?

Posted: Fri Jun 24, 2011 8:52 am
by stepson
no idea anybody ?

how to insert a link to com_mailto on its own page like it is done on the articles ?

i have seen how to generate the code with the onclik=openwindow..., but I do not see how to generate the link reference that is used in the parameters.

any idea ?