GetSimple Support Forum

Full Version: how to disable sidebar content-side
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,
in my template, I get side-specific sidebar-content with this code:
Code:
if (isset($_GET['id']) && $_GET['id'] == 'slug') { getPageContent('sidebar-slug'); }
the sidebar-contetn are sides, starting with a name with "sidebar" at the begining... But when I set them on "private", they are still online.
On which point and for which variable I have to ask here, to locate this "private" mode?
best, Bell.
maybe with this
assuming field is "private" maybe ?

/**
* Get Page Field
*
* Retrieve and display the requested field from the given page.
*
* @since 3.1
* @param $page - slug of the page to retrieve content
* @param $field - the Field to display
*
*/
function getPageField($page,$field){
hi shawn,

yes, thank you, thereabout.
(there I got an 'Y'-Problem with a resistant Y, because of the "echo" ...)

so I add my sidebar-section in the template.php with
Code:
if (isset($_GET['id']) && $_GET['id'] == 'slug' && returnPageField('sidebar-slug','private') == FALSE) { getPageContent('sidebar-slug'); }

On my view, its easier for users, to feed the sidebar by the page-menu, than by the component.


great,
best, Bell.
oh sorry, I always forget our functions are terribly named. I always mix them up. A getter should never echo, but I digress.