简体   繁体   中英

pass joomla article id to modal iframe form

I have a view in my joomla 2.5 component and a form at this. now I'm show this form pop up in my article by this code by use joomla modal and it's work

<a class="modal"  rel="{handler: \'iframe\', size: {x: 600, y: 375}}" href='.$formlink.'>my text</a>

now how can I send my article id to this form for insert it to my database? I want pass my article id to iframe form.

i found how can do it. we can do it use this code:

$id = $article->id; $formlink = JRoute::_("index.php?option=com_mycomponent&view=myview&tmpl=component&id=$id")

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM