How can I remove or hide Global Links from login screen in SugarCRM? - sugarcrm

I am using SugarCRM 6.5 community edition. There are "globalLinks" on Login screen.
I don't want these links Employees, Support, About on login page. How can i remove it from login page only?

I have found solution for remove global links from header. Try with below code:
Create new file custom/Extension/application/Ext/GlobalLinks/links.php
if (isset($global_control_links['training']))
{
unset($global_control_links['training']);
}
if (isset($global_control_links['employees']))
{
unset($global_control_links['employees']);
}
if (isset($global_control_links['about']))
{
unset($global_control_links['about']);
}

Place this in custom/include/globalControlLinks.php:
// To add new links
$global_control_links['training'] = array(
'linkinfo' => array($app_strings['LBL_TRAINING'] => 'index.php?module=Administration&action=ServiceCase'),
'submenu' => ''
);
// To remove existing links
$global_control_links['about'] = array();`

Related

TYPO3 Extbase Parameters in Url get ignored. No action is called

I'm writing an extension which checks for the browser version, and if the version isn't supported a hint is showed.
I'm doing this with a typoscript condition, which works well so far. But in the hint is a link for the ignoring. The link should call my action "setSessionParameters" in the controller "BrowserCheck". If the link is clicked the correct url gets called, but the same output as before is shown (the hint). The action is completly ignored. I tried to put in a non existing action, but not even an exception is called, which means for me: It's not checked if the question is allowed in the ext_localconf and neither it gets checked in the controller.
I think the typoscript configuration could be a problem, but I can't find a solution. Can anyone help?
Please see my code below
ext_localconf.php:
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
'VENDOR.' . $extensionKey,
'browsercheck',
[
'BrowserCheck' => 'setSessionParameter',
],
[
'BrowserCheck' => 'setSessionParameter',
]
);
page.typoscript:
page = PAGE
[session('wcobrowsercheck') == "ignore" || checkInternetExplorer()]
page{
//normal setup
}
[ELSE]
// called setup for hint-case
page >
page = PAGE
page{
typeNum = 0
shortcutIcon = {$files.favicon.path}
10 = FLUIDTEMPLATE
10 {
templateRootPaths {
0 = EXT:my_extension/Resources/Private/Templates/BrowserCheck
}
layoutRootPaths {
0 = EXT:my_extension/Resources/Private/Layouts/BrowserCheck
}
templateName = MainPage
}
includeCSS {
...
}
}
[END]
link call in the template:
<f:link.action controller="BrowserCheck" action="setSessionParameters" extensionName="my_extension" pluginName="browsercheck" arguments="{ignore: 'true'}"> ignore </f:link.action>
I see 2 issues with your setup.
You define the PAGE object twice. And the second time you wipe all previous configuration
I can't see that you have placed the plugin on the page.
As your question targets the second issue, I recommend adding the plugin to the page via typoscript if you want that plugin to be available everywhere.
page = PAGE
// ...
page.999 < tt_content.list.20.extkey_pluginname
Or you use a plugin that is placed on the page as a content element. Both will work. But with the current setup you cannot call the plugin as it's not present on the page.

Create a new link stye in Typo3?

Is there a way to add a new style to the Insert Link dialog in Typo3?
Currently they are "internal-link", "internal-link-new-window", or no style.
I have tried putting various things in the Page tsconfig with no results at all...
I found this on another site which looks like it does what I want but I can't get it to do anything:
RTE.classesAnchor {
tollerLink1 {
class = button
type = page
titleText = Button
}
}
RTE.default {
classesAnchor:=addToList(button)
}
In your TsConfig (Home Page Properties - Resources - Page TSConfig)
RTE.default.buttons {
link.properties.class.allowedClasses := addToList(internal-link-new-window)
}

CakePHP form in facebook validates on initial load

I have a simple form in CakePHP (version 2.4). If I open the url in the browser everything is OK, the form only validates after I click Submit for the first time. But if I put that same form inside Facebook app (as Page Tab) the same form validates right away and outputs all the errors before user even clicks Submit (ofcourse because all the required fields are empty on initial load).
My controler for the Form Add:
public function add($id = null) {
$this->set('title_for_layout', "Fb Form");
if (!empty($this->data)) {
$this->Application->create($this->data);
if ($this->Application->save()) {
$this->Application->saveField('fbapp_id', $id);
$this->Session->setFlash('Form saved');
$this->redirect(array('action' => 'add'));
} else {
$this->Session->setFlash('Form not saved');
}
}
}
Any help would be greatly appriciated so thnx in advance!

Yii page not redirect

I have 2 forms
$form=$this->beginWidget('CActiveForm', array(
'id'=>'step1-form',
'enableClientValidation'=>false,
'enableAjaxValidation'=>true,
'clientOptions'=>array(
'validateOnSubmit'=>true,
'validateOnChange'=>false,
),
in Controller
if(isset($_POST['yt0']))
{
Yii::app()->request->cookies['step'] = new CHttpCookie('step', '1');
$this->redirect(Yii::app()->createUrl("timeshares/edit"));
}
in GET i have html code new page but in screen i have old page
pic http://rghost.ru/46015416.view
Try this:
$this->redirect(array('timeshares/edit'));
But I was wondering, edit might need ID. If yes, then try this:
$this->redirect(array('timeshares/edit','id'=>$user));
if(isset($_POST['model_name']))
{
Yii::app()->request->cookies['step'] = new CHttpCookie('step', '1');
$this->redirect(Yii::app()->createUrl("timeshares/edit"));
}
Instead model_name insert your model name. if your model name is yt0 then is correct.

Zend_Navigation: Having trouble getting breadcrumbs to render using multiple containers [duplicate]

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
Zend Framework - multiplate navigation blocks
I'm trying to make breadcrumbs render in my application ( they don't show up anywhere, not even the homepage, which has a corresponding Zend Page Uri object ), which has multiple navigation areas - primary and utility. For the menu generation, I have a MenuController which I render with from within the layout using:
$this->layout()->utility = $this->action('render', 'menu', null, array('menu' => $this->utilityId));
$this->layout()->nav = $this->action('render', 'menu', null, array('menu' => $this->mainMenuId));
The utilityId and mainMenuId properties are numbers, grabbed from a database.
The Menu controller's render method just builds an array and creates a Zend Navigation object, then invokes setContainer and sets it to that container. This is pseudo code because it's rather long:
// MenuController.php
private function renderAction() {
$itemArray[] = array('label' => $label, 'uri' => $uri ); // in a loop
$container = new Zend_Navigation($itemArray);
if ( $container instanceof Zend_Navigation_Container ) {
$this->view->navigation()->setContainer( $container );
$uri = $this->_request->getPathInfo();
$item = $this->view->navigation()->findByUri($uri);
$item->active = true;
}
}
So this render method is called twice from within the layout for the utility and nav.
EDIT:
I think the issue is that I need to specify the $container so my code would be
$this->navigation($container)->breadcrumbs();
However because I'm using $this->action('render', 'menu' ) the $container variable is set there and not returned, is there a way I can specify the container some other way? Possibly using $this->layout()->nav and a property in that which points to the container.
This looks like it's the same issue and someone suggests setting/getting them with Zend_Registry, perhaps I'll try this out.
I suspect you don't have a navigational hierarchy. You need pages within pages.
e.g.
Home Page
[pages] => Sign In
[pages] => Forgot Password
=> Create Account
[pages] => Confirm Account Email
=> Email Confirmed
With the above, breadcrumbs will be rendered on all active pages except for the Home Page... all pages if you do this:
$this->navigation()->breadcrumbs()->setMinDepth(0); // don't skip the root page
Or maybe it's something else, but it's hard to say. I hope that helps, though!
This is probably a dirty solution, but I manually set the container reference using Zend_Registry like so:
Zend_Registry::set( 'nav' . $menu, $container );
And spit it out like so:
$main = Zend_Registry::get( 'nav' . $this->mainMenuId );
echo $this->navigation( $main )->breadcrumbs()->setMinDepth(0);