JAN44 Posted August 7, 2019 at 09:44 AM Share Posted August 7, 2019 at 09:44 AM Hello, What is the php code i should use to verify the choosed option for a specific custom field in current listing (on front end) ? For example for the custom field jr_cars i need to check if the current listing have BWM as option or not, i am looking for True/false result. I am using "advanced module extension" to show specific module on specific pages accross the website. __ i am doing this with easydiscuss, here an example of the used code : require_once(JPATH_ADMINISTRATOR . '/components/com_easydiscuss/includes/easydiscuss.php'); $postId = JRequest::getInt('id'); $component = JRequest::getVar('option'); $customView = JRequest::getVar('view'); // set your respected category id here $respectedCatId = '23'; if ($component == 'com_easydiscuss' && $customView == 'post' && $postId) { $post = ED::post($postId); $currentPostCategoryId = $post->category_id; if ($respectedCatId == $currentPostCategoryId) { return true; } } return false; Link to comment
Alejandro Posted August 7, 2019 at 03:05 PM Share Posted August 7, 2019 at 03:05 PM This section is only visible with a valid subscription. If you have a valid subscription, please login. Link to comment
JAN44 Posted August 7, 2019 at 03:27 PM Author Share Posted August 7, 2019 at 03:27 PM This section is only visible with a valid subscription. If you have a valid subscription, please login. Link to comment
JAN44 Posted August 7, 2019 at 03:28 PM Author Share Posted August 7, 2019 at 03:28 PM This section is only visible with a valid subscription. If you have a valid subscription, please login. Link to comment
Alejandro Posted August 7, 2019 at 06:12 PM Share Posted August 7, 2019 at 06:12 PM This section is only visible with a valid subscription. If you have a valid subscription, please login. Link to comment
JAN44 Posted August 22, 2019 at 02:49 PM Author Share Posted August 22, 2019 at 02:49 PM This section is only visible with a valid subscription. If you have a valid subscription, please login. Link to comment
Alejandro Posted August 22, 2019 at 03:01 PM Share Posted August 22, 2019 at 03:01 PM This section is only visible with a valid subscription. If you have a valid subscription, please login. Link to comment
JAN44 Posted August 22, 2019 at 03:39 PM Author Share Posted August 22, 2019 at 03:39 PM This section is only visible with a valid subscription. If you have a valid subscription, please login. Link to comment
Alejandro Posted August 22, 2019 at 07:07 PM Share Posted August 22, 2019 at 07:07 PM This section is only visible with a valid subscription. If you have a valid subscription, please login. Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.