Blog

Posted by: 
Dominique De Cooman

A cck fieldgroup can be rendered alone. We had some quicktabs we wanted to fill with our field groups. So we've builded a block for each field group to put in the quicktabs. Here is an example of one block where we called a single fieldgroup and rendered it.

Posted by: 
Dominique De Cooman

How to add another formatter to a cck field? A cck formatter is basically a theming function where the value of field is ran through. Formatters are available at "admin/content/node-type/[your node type]/display" in the cck interface.

Posted by: 
Dominique De Cooman

How to load only the content fields of a node to avoid a full node load?

Sometimes in scripts you need information stored in cck fields but you dont want to do full node loads neither do you want to query the table directly because setting a field from single to multiple value would make the table location of that field change.

Posted by: 
Dominique De Cooman

The standard way of altering form elements and setting them disabled does not work with cck fields.

<?php
function my_module_form_alter(&$form, &$form_state$form_id) {
  
$form['my_element']['#disabled'] = true
}
?>

The FAPI process handler of the CCK field won't transfer the #disabled attribute to its children elements.
You'll need this snippet to make it work.
<?php
/**?>

Posted by: 
Dominique De Cooman

The jquery scrollto is now available to drupal by using this project:

http://drupal.org/project/jquery_scrollto

For more on the jquery scroll to plugin http://plugins.jquery.com/project/ScrollTo

Posted by: 
Dominique De Cooman

This first project is used to make your interface localized easier. The second project is an API to look for translatable strings and translatability errors.
http://drupal.org/project/l10n_client
http://drupal.org/project/potx

Posted by: 
Dominique De Cooman
Posted by: 
Dominique De Cooman

The main function in drupal to format a date is the format_date function which will take the formatting and timezone conversion you configured at http://yoursite/admin/settings/date-time and http://yoursite/admin/settings/date-time/formats

<?php
//format_date($timestamp, $type = 'medium', $format = '', $timezone = NULL, $langcode = NULL)
//An example convert the unix timestamp for now 
?>

Posted by: 
Dominique De Cooman

In this post adding a setting from php to your jquery script will be explained through an example: Adding an api key as a variable to our query script.

Posted by: 
Dominique De Cooman

As we all know drupal has a default front page which shows a view of teaser nodes promoted to front.
Most sites will replace this page with something else.
But we might forget that we can still go to this page. You might want to remove it.
A simple trick to do this is to make it go to the page not found.

Pages

Subscribe to Blog