Category: Drupal
Using views_embed_view
The need arised to display a single content type — which included a conditional field that separated the content into two categories depending on that condition — in a block depending on which category’s landing page a user arrived on. Following? No? Alright….
Assume you have two factions of one website, for example’s sake, lets say you’re building a summer camp website that has a girls side and a boys side. A cookie is set when a user arrives at domain.org/boyscamp or /girlscamp that simply states which page they landed on. Both sides have campfire nights that they would like to publish on the website using the same form, with a condition boys or girls, but only one of the sides is going to display in a single block. The website is the same for both sides with the exception of …
Views 3.x Node Argument
In using Views 3 recently, I found, as I’m sure most everyone else has, that it has had some significant changes in the new release. The one that got me recently was triggering the display of a Content field with the argument based on the current node ID…
Patch: Ubercart Better Cart Links
Development for the module seems to be mostly at a standstill, presumably due to the developer jumping into Drupal Commerce, yet for the Drupal 6.x users still working with Ubercart, Better Cart Links is pretty much unusable.
Attempting to create a link with Better Cart Links drops the error “Product ID not valid” even when using a valid Node ID.
Anyway, here’s the patch. The issue was product IDs being called incorrectly in the mysql query. The fix is working well for me, but if you have any issues let me know.
Fantastic Drupal Modules: Context
I’ve had the pleasure of working with Context on a project this past week — I must say I am impressed. Everything that annoyed me about building a Drupal site has virtually be solved by a single module.
What it does is actually pretty ingenious — the module basically allows you to set conditions which trigger actions based on those conditions that can be used to modify virtually any node. So you can display particular blocks, themes, custom javascript, insert an HTTP Header, or load css files on a node based on arguments which you define. The arguments can be anything from a node type, cck field, or even custom PHP that evaluates true.
Context is an amazing module – also be sure to check out it’s many add-ons on d.o.
