Submitted by geoff on Thu, 2012-02-23 00:10
Drupal makes it very easy to modify a theme, and still be able to apply updates to that heme as they are released. This is done with a subtheme. Essentially, it is a level on top of an existing theme that changes that theme. Leaving the underlying theme untouched. Any updates to the underlying theme can be easily applied without having to repatch changes.
To implement a subtheme of, say, Bartik
Submitted by geoff on Thu, 2012-02-16 11:42
You can load a node if you know its Node ID using
$node = node_load($nid);
But if you know its title only, you can load the node as follows
Submitted by geoff on Wed, 2012-02-15 13:14
Submitted by geoff on Mon, 2012-01-30 14:29
I have a Ubercart Product that is loosly linked to some data. I want to display the first image attached to that Product and I know the Node ID of the product.
Submitted by geoff on Tue, 2012-01-24 15:09
So I want to divide the raw data being collected in my current project from the administrative data. The situiation is there will be thousands of small devices gathering data and sending that back to a data repository. A series of polling servers will request ("pull") data from the dumber of the devices and place them in this database. The smarter devices will "push" straight to an "API" server that then does the same. There is going to be a massive amount of data and I don't want the front end site slowed down.
Submitted by geoff on Tue, 2012-01-17 17:04
When you are writing code that will fit into a page, how do you know the page you are on.
There are two (2) paths. The Real path that Drupal uses
node/147
Which can be found this function.
current_path();
And the Aliased path that you are actually using. PathAuto will do this for you or you might manually set a path.
Submitted by geoff on Tue, 2012-01-17 10:22
I have a content type called "Personal Links" that have a list of URLs that I want to store - bookmarks. I also have a view that lists this links where the current user is the creator.
What I want is that when I am looking at the details page or edit page for a personal link, I have the option of a "List" tab that takes me back to the list of all my links.
I do this with Page manager
Submitted by geoff on Tue, 2012-01-17 10:06
Page Manager allows you to build up a "page" with smaller "panels", such that you can add fields, blocks and views into different layouts. But how do you write your own custom panel?
Page Manager is a part of the Chaos Tools module.
Register a Plugin Directory
Create this function in your modules .module file. This simply tells cTools where to look for additional plugins.
Remember that Chaos Tools uses the term "Content Types" differently to the Drupal Core.
Submitted by geoff on Tue, 2012-01-10 15:45
drush php-eval "print print_r(node_load(109), 1)"
Submitted by geoff on Tue, 2012-01-10 14:09
If you want to play with nodes, taxomony and comments, there is a process and set of functions that you should use to do that.
If you just want to drop some adhoc data into a table, then you can use the db_insert() function.
Here is an example.
Pages