How display plugin modal in code

More
5 years 10 months 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.

More
5 years 10 months 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...

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

More
5 years 9 months 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.

More
5 years 9 months 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...

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

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.392 seconds
Save
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline