Drupal

Change the Breadcrumb of an UberCart Product

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.

Tags:

Drupal Modules:

Get the Current NID and Node for a Page in Drupal 7

Anywere in code, if you want the current NID or Node for that page - if it exists - use this

Tags:

All Nodes for a Particular Type in Drupal 7

This collects all NID's for nodes

Tags:

Show all available variables

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());

Tags:

Creating a Subtheme of Bartik in Drupal 7

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

Tags:

Drupal Modules:

Load a Node by Title in Drupal

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

Tags:

Modifying a Node before/after it is saved in Drupal 7

To modify a node before it is saved to the database, use the hook_node_pressave() function

Tags:

Drupal 7 Displaying an Image in Code

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.

Tags:

Drupal Modules:

Using AWS SDK for PHP

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.

Tags:

Drupal Modules:

What Path is the current page in Drupal 7

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.

Tags:

Pages

Subscribe to RSS - Drupal

Your IP Info

IP Address Locator

Speed Test

Test how fast your Internet connection really is.

DropBox

Use this link to get DropBox http://db.tt/iQHWaaF