How display plugin modal in code

7 months 4 days ago #75624 by tadzio
I have a general question. I know that flexicontent can be done easily.
But I would like to display a plugin
{modal url} text {/ modal} on the form in which I can only enter the php and html code.

JPluginHelper::importPlugin('system', 'modal');
$dispatcher = JEventDispatcher::getInstance();
$var1 = 'URL';
$var2 = 'text';
$results = $dispatcher->trigger('onAfterRender', array(&$var1, &$var2));
return ($results);

the result is text 'array'
Can you do it?

Please Log in or Create an account to join the conversation.

7 months 2 days ago #75651 by ggppdk
Hello

i am not sure that i understand you question

you want to add this code where ?

e.g.
you want to add it inside
item.php of our item view layout

e.g.
you want to add this to a custom layout of flexicontent field
plugins/flexicontent_fieslds/text/tmpl/value_mytest.php


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star review. Thanks!

Please Log in or Create an account to join the conversation.

6 months 4 weeks ago #75673 by tadzio
I guess you can compare it to item.php.
The question is not about flexicontent because flexi know how to do it.
This applies to the form in which I can add my php code. I retain the result by return.
Modal in html works ok. But I can not run the plugin inside the code.
Unfortunately, not all component authors have your knowledge.

Please Log in or Create an account to join the conversation.

6 months 4 weeks ago #75678 by ggppdk
Hmm

usually you can not trigger the event onAfterRender multiple times without problems

but are you sure that you want to trigger onAfterRender ?

probably you want to trigger the 'onContentPrepare' event that also (can) exist inside system plugins

so try triggering the event 'onContentPrepare'
see an example here

flexicontent.org/documentation/faq/71-fi...maps-plugin-etc.html


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star review. Thanks!

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
© 2018 Flexicontent. All Rights Reserved.