Write this function on your template.php file in themes folder
function MYTHEME_preprocess_page(&$variables) {
if ($variables['node']->type == 'MYNODETYPE') {
$links = array();
// yet another link
$links[] = l('Some Other Link', 'SOMEOTHERLINK');
// lastly, overwrite the contents of the breadcrumbs variable in the page scope
$variables['breadcrumb'] = theme('breadcrumb', $links);
}
}
Example
function MYTHEME_preprocess_page(&$variables) {
if ($variables['node']->type == 'project') {
$links = array();
// yet another link
$links[] = l('Projects', 'projects');
$links[] = l($variables['node']->title, 'node/'.$variables['node']->nid);
// lastly, overwrite the contents of the breadcrumbs variable in the page scope
$variables['breadcrumb'] = theme('breadcrumb', $links);
}
}
Saturday, February 13, 2010
Browse button not seen on image browser
Usually when we install tinymce or fckeditor through WYSIWYG we cant see the browse button. It can be solved by adding the module IMCE Wysiwyg bridge (http://drupal.org/project/imce_wysiwyg). Once you installed this don't forget to select the buttons needed on editor by enabling them in WYSIWYG editor settings
Saturday, November 21, 2009
'Page Not Found' error on all pages of Drupal website
I got page not error on all pages of a drupal website.
I solved this by running update.php
Soetimes this fixed navigation only. Clean urls will not work.
I found that .htaccess was corrupted. I transfered it again. It worked.
Finally I enabled clean URLS from my admin panel.
I solved this by running update.php
Soetimes this fixed navigation only. Clean urls will not work.
I found that .htaccess was corrupted. I transfered it again. It worked.
Finally I enabled clean URLS from my admin panel.
Monday, November 2, 2009
Setting cron job in drupal
Goto cpanel select cronjobs , you can see standard/advanced option.
Add this 'curl --silent --compressed http://yourdomain.com/cron.php'
Add this 'curl --silent --compressed http://yourdomain.com/cron.php'
Thursday, October 8, 2009
Browse button not seen in tinymce
Add this function to template.php file in themes folder
/*
*Function for TinyMCE browse button
*/
function phptemplate_tinymce_theme($init, $textarea_name, $theme_name, $is_running) {
static $access, $integrated;
if (!isset($access)) {
$access = function_exists('imce_access') && imce_access();
}
$init = theme_tinymce_theme($init, $textarea_name, $theme_name, $is_running);
if ($init && $access) {
$init['file_browser_callback'] = 'imceImageBrowser';
if (!isset($integrated)) {
$integrated = TRUE;
drupal_add_js("function imceImageBrowser(fid, url, type, win) {win.open(Drupal.settings.basePath +'?q=imce&app=TinyMCE|url@'+ fid, '', 'width=760,height=560,resizable=1');}", 'inline');
}
}
return $init;
}
/*
*Function for TinyMCE browse button
*/
function phptemplate_tinymce_theme($init, $textarea_name, $theme_name, $is_running) {
static $access, $integrated;
if (!isset($access)) {
$access = function_exists('imce_access') && imce_access();
}
$init = theme_tinymce_theme($init, $textarea_name, $theme_name, $is_running);
if ($init && $access) {
$init['file_browser_callback'] = 'imceImageBrowser';
if (!isset($integrated)) {
$integrated = TRUE;
drupal_add_js("function imceImageBrowser(fid, url, type, win) {win.open(Drupal.settings.basePath +'?q=imce&app=TinyMCE|url@'+ fid, '', 'width=760,height=560,resizable=1');}", 'inline');
}
}
return $init;
}
Tuesday, September 29, 2009
Drupal
Drupal is one of the best Content Management Systems (CMS). It is written in PHP and requires a MySQL database. Its so easy to build different types of web sites - from simple web logs to large online communities.It is distributed under the GNU General Public License.
We can add new features and custom behaviour to drupal.
Drupal was originally written by Dries Buytaert. In the year 2001 it becomes an open source project.For more about drupal Drupal
We can add new features and custom behaviour to drupal.
Drupal was originally written by Dries Buytaert. In the year 2001 it becomes an open source project.For more about drupal Drupal
Subscribe to:
Posts (Atom)