Hope somebody can help me one more time. :mrgreen:
I read from the other post that form variables can not go to category list page as an added table column.
How about showing an icon next to title(that way no extra column needed) so that people know this article has attachment?
Of course, this doesn't work.
Please don't laugh at me!
I read from the other post that form variables can not go to category list page as an added table column.
How about showing an icon next to title(that way no extra column needed) so that people know this article has attachment?
$title = JRequest::getVar('title', '');
if ( $title ) {
$title_hasfile = str_replace("{title}", '<span><img src="images/icon_file.gif/'.JRequest::getVar("title").'"/></span>', $title_hasfile);
}else {
$title_hasfile = str_replace("{title}", '', $title_hasfile);}
JRequest::setVar("title", $title_hasfile);
Of course, this doesn't work.
Please don't laugh at me!
Hi freefall,
It's past midnight nere so I'm not going to solve it for you now but the code you have looks pretty close.
Bob
It's past midnight nere so I'm not going to solve it for you now but the code you have looks pretty close.
Bob
I opened many joomla files to figure out what the correct syntax is. I mixed /matched/tried many combination, but failed.. could you take a look?😶
It shows file path, not the actual image. Thank you.
It shows file path, not the actual image. Thank you.
$title_hasfile="{title}";
$title = JRequest::getVar('title', '');
if ( $file_1 ) {
$title_hasfile = JRequest::getVar('title', '', 'post'). 'Â ' . JHTML::_('image','images/icon_file.gif',null) ;
}else {
$title_hasfile = JRequest::getVar('title', '', 'post');}
JRequest::setVar("title", $title_hasfile);
Hi freefall,
Where exactly are you putting this code. I'm not sure if this is ChronoForms or ChronoConnectivity? And which box are you putting it in?
Bob
Where exactly are you putting this code. I'm not sure if this is ChronoForms or ChronoConnectivity? And which box are you putting it in?
Bob
Hi freefall,
And where are you displaying the result - there's no echo or print line in that code snippet??
Bob
And where are you displaying the result - there's no echo or print line in that code snippet??
Bob
Hi all,
I belive the issue here lies in that the title is passed through the escape() method in the current JView instance used to display the article list. As such, any html-codes in the title will be "properly" encoded, and displayed in plaintext. That's even if you manually add the <img /> tag to the database record using perhaps phpMyAdmin.
Unless you are willing to rewrite the com_content component rather extensively, you will not be able to achieve this. It's not a limit of ChronoForms, but of the Content component.
/Fredrik
I belive the issue here lies in that the title is passed through the escape() method in the current JView instance used to display the article list. As such, any html-codes in the title will be "properly" encoded, and displayed in plaintext. That's even if you manually add the <img /> tag to the database record using perhaps phpMyAdmin.
Unless you are willing to rewrite the com_content component rather extensively, you will not be able to achieve this. It's not a limit of ChronoForms, but of the Content component.
/Fredrik
This topic is locked and no more replies can be posted.