Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
how to disable sidebar content-side
#1
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.
Reply
#2
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){
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#3
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.
Reply
#4
oh sorry, I always forget our functions are terribly named. I always mix them up. A getter should never echo, but I digress.
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply




Users browsing this thread: 1 Guest(s)