Submitted by geoff on Sat, 2012-04-28 11:44
For a watch site, we want the breadcrumb for a watch to read
Home >> Brand >> Watch
To do this, we create or edit the theme's template.php file and add a function.
In this case we have a sub-theme of Marinelli. This has its own breadcrumb function.
We just want to append the brand and let the core-theme function do the rest of the work.
Submitted by geoff on Sat, 2012-04-28 11:04
Anywere in code, if you want the current NID or Node for that page - if it exists - use this
Submitted by geoff on Sat, 2012-04-21 23:26
This collects all NID's for nodes
Submitted by geoff on Tue, 2012-04-10 13:41
Sometime when working with an API, you have a heap of variables available - but what are they?
You can use the PHP function
get_defined_vars();
In Drupal, if you have the Devel module enaled, you can also use
dpm(get_defined_vars());
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.
Pages