Changing Short project name in a Drupal.org project
Typical problem, you have just gained your full project permissions role in Drupal.org, and you make your first mess... you have promoted your so loved first project without changing the Short project name.
Well, you have a problem, but not too big. Drupal.org will not allow you to rename your Short project name, so you will have to create a new one if you don't want to have an ugly url like that: https://drupal.org/project/2062343
Fortunately git can help. You will simply have to:
Howto patch a Drupal module
Some contributtion to add to this Drupal module with which you have been working on?
Very easy, take note:
- Read more about Howto patch a Drupal module
- Log in or register to post comments
Get Drupal fields for a particular content type
Sometimes in Drupal you need to get the fields for a particular content types.
"$type = 'mytype';
$fields = content_fields();
$type_fields = array();
foreach ($fields as $field_name => $field_data)
{
if ($field_data['type_name'] == $type)
{
$type_fields[$field_name] = $field_data;
}
}"
in drupal7 is easier, since we have a direct function:
field_info_instances($entity_type = NULL, $bundle_name = NULL)
- Read more about Get Drupal fields for a particular content type
- Log in or register to post comments
get current drupal theme
very simple:
global $theme_key;
echo $theme_key;
if we need more information, we can use this:
$themes = list_themes();
$theme_object = $themes[$theme_key];
// print all the object fields
var_dump($theme_object);
- Read more about get current drupal theme
- Log in or register to post comments