Skip to content

Instantly share code, notes, and snippets.

@jwhitcraft
Created March 3, 2012 12:55
Show Gist options
  • Save jwhitcraft/1965938 to your computer and use it in GitHub Desktop.
Save jwhitcraft/1965938 to your computer and use it in GitHub Desktop.
<?php
// this file is non-upgrade safe
// location: custom/modules/Contacts/views/view.detail.php
require_once('include/MVC/View/views/view.detail.php');
class ContactsViewDetail extends ViewDetail {
/**
* @see SugarView::display()
*
* We are overriding the display method to manipulate the portal information.
* If portal is not enabled then don't show the portal fields.
*/
public function display()
{
$admin = new Administration();
$admin->retrieveSettings();
if (isset($admin->settings['portal_on']) && $admin->settings['portal_on']) {
$this->ss->assign("PORTAL_ENABLED", true);
}
// my custom code here
parent::display();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment