Forum


List Manager Support

List Manager support
Forums
Public write access is disabled. Please login

Insert code in Detail Layout 17.02.2015 18:55

Hi,
I would like to insert some code (html, php or js) in the Detail Layout. My pourpose is to show a web page into the modal popup. I create a "URL" field so I am able to show a "link" into the Detail popup (using ##URL## tag). To directly show the page content I need insert this URL in an iframe (e.g.) or use a php or js function. But if I put the command all the row will disappear on save. I tried to use the code view, but is the same, regardeless I put the ##URL## tag or whatever else. Is there a way to insert some code in the Detail Layout windows? Do you have any other suggestion to show a page in a modal popup (e.g. inserting some clickable code in a field)?
Thank you very much in advance.
cmc

Re: Insert code in Detail Layout 18.02.2015 14:09

Hi,
when you insert some special tags at the editor like iframe, they are stripped (not only for listmanager, it happens also for other joomla contents).If you already have the url created and you can display it with ##URL##, you could manually add the iframe tag to the display view.

modules/mod_listmanager/tmpl/content.php

viewDetail function. Where you find last appearance of

contentHTML=contentHTML.replace.....

you already have the html content that will be inserted at the popup. So you could create an iframe just after that

contentHTML="youriframetag id='iframeID' src='"+contentHTML+"' closeiframe";

so the popup will display an iframe with the proper source. You will need to create the id for the iframe, so you can force it to refresh for each popup. At the end of the same function, after setRated instruction, you'll need to add

LMJQ("#iframeID").reload();



Hope this helps, regards
Moonsoft Team
www.moonsoft.es

Re: Insert code in Detail Layout 19.02.2015 13:19

Thank you very much for support.

I add this code starting from line 339 of /modules/mod_listmanager/tmpl/content.php

contentHTML=contentHTML.replace(new RegExp("[#]{2}(.)*[#]{2}", "g"), "");

// CMC ADD IFRAME CODE
contentHTML="iframe id='iframeID' src='"+contentHTML+"'/iframe";
// CMC END IFRAME CODE

LMJQ('#cb_detail').html(contentHTML);

iframe and /iframe have the correct GT and LT tags, but if I put those tag the message editor windows will delete them...

but nothing happens... I continue to view the URL in Detaile Layout instead of iframe...

This is the test page:
http://ceraunavoltailcaffe.jomsite.it/list-manager/

Can you help me?
cmc

Edited by imsj - 19.02.2015 13:20

Edited by imsj - 19.02.2015 13:23

Re: Insert code in Detail Layout 19.02.2015 13:54

Hi,

We checked your site and seems that there's a problem with line breaks, and all code added appears in one line and commented because first line added is a comment line. You should delete comment lines and try again.

Regards,
Moonsoft Team
www.moonsoft.es

Re: Insert code in Detail Layout 19.02.2015 15:39

I don't know what happened, but I insert again lines break and now works fine.
Thank you for your support.
cmc
Are you satisfied with our products/services/support?
Please help us to keep improving, add a review at  joomla extensions site and  magento connect
FaLang translation system by Faboba

Our clients' feedback