I understand that creating customizations are not supported. I was wondering if I could get pointed in the right direction with a snippet of code.
I'm wanting to access an EasySocial boolean custom field for the current logged in user. For example I want to let the user decide if certain site menu's should float such as the header. The problem is that I don't know how to check the boolean field in the condition. See PHP code:
<?php
if(ES-Unique-Key-BOOLEAN == true) {
//JS code to append floating class
}
else {
// remove floating class from menus
}
?>
I see some info on it in
the docs.
Would the PHP code block start out with:
require_once(JPATH_ADMINISTRATOR . '/components/com_easysocial/includes/easysocial.php');
$my = ES::user();
$state = $my->setFieldValue(string $key, 'some value here');
? Also where it says "some value here", is this where the unique key goes? Also I'm not quite sure where to apply:
public function setFieldValue($key, $value)
I would put the code in index.php of the current template. Any pointers would go greatly appreciated.