Drupal

How to change the title of a drupal view via code

Submitted by matthew on June 1, 2011 - 9:32pm

If you have a view and you want to be able to programmatically change the title of, you can do it via views hooks in your custom module:


function customModule_views_pre_render(&$view) {
if ($view->name == 'view_name' && $view->current_display == 'display_id') {
// Here you can do any php you want to get the title you need for your view.
$view->build_info['title'] = "My custom title!"
}
}

Easy peasy huh?

I have been looking for a way to upload a file in flex and save the bytearray directly to drupal via amf. This was written on Drupal 5 however it can easily be added to Drupal 6. Just note there is already a file_services module in D6 and not d5. Here's what I have come up with that works great:

What is Drupal?

Drupal - a completely free, open source content management system that many organizations are using today to provide for their needs. Drupal's many features and add-ons allow it to be used for a variety of website needs. Drupal is a good choice for today's organizations of any size because it is free, easy, and incredibly flexible.

Syndicate content
Copyright © mrconnerton.com, 2008-2010. All Rights Reserved Drupal theme by Kiwi Themes.