This site uses cookies and similar technologies.

If you don't change browser settings, you agree to it.

I understand
Announcement: Please use Github, to report any new issue or pull request.
None
Russian sebloders - Ilya A.Zhulin
2014-12-25
All
MySQL 5.2.x
PHP 5.4
Merry Cristmas everybody!
There is a such problem:
I try to set a link in my Item View. I want to get Menu id from a field and choose this option in Menu Select. After this I have a non-SEO link with itemid=-2.
I looked around the CCK Filed Link->content plugin code and found that there are not some operation with 'itemid_fieldname' field. So, -2 - is Select option value and it operates like itemid. It works with another options where option values are equal to itemids.
As temporal solution I put followinf code after string 43 $itemId =( $sef ) ? $link->get( 'itemid', '' ) : '';

if ($itemId == '-2') {<br> $itemid_fieldname = $link->get('itemid_fieldname', '');
  $itemid_params = JCckDatabase::loadObject('select storage_table, storage_field from #__cck_core_fields where name="' . $itemid_fieldname . '"');
  $itemId = JCckDatabase::loadResult('select ' . $itemid_params->storage_field . ' from ' . $itemid_params->storage_table . ' where id=' . $config["pk"]);
}

Files & Images

images/tracker/261/content.zip
Select optionChange fieldname
Need some help?

Comments