Drupal: How do I pull a CCK field from a node associated with a menu-item into a menu block
Solving my own problems, word.
Background
My background is in web development with a focus on User Interfaces and Front End Development. I have been working as a front-end engineer since 1997. Throughout my career, I have had the chance to work on many different areas including UI, IA, product management, code development, design, optimization, SEO, open source software solutions and client relations. I strive to make my projects extensible and standard compliant with a focus on HTTP and browser/page performance. I work primarily in (X)HTML, CSS, XSL(T) and JavaScript (jQuery).
Thank you for stopping by! If you have any questions about my work, the site or its contents, or wish to inquire about my availability for projects, feel free to contact me. I am always looking for interesting projects. (contract, freelance, full-time).
Work History





Solving my own problems, word.
Documenting this code, it was useful in a recent project
Displays a block on node or listing page
<?php
$make_block_visible = FALSE;
// the term id to show this block on
$term_id_to_trigger_show_block = 1;
// LISTING PAGE. taxonomy/terms/x
if ((arg(0) == 'taxonomy') && (arg(1) == 'term') && (arg(2) == $term_id_to_trigger_show_block)) {
$make_block_visible = TRUE;
}
// NODES
if (arg(0) == 'node' && arg(1) && is_numeric(arg(1))) {
$node = node_load(arg(1));
foreach ($node->taxonomy as $term) {
if ($term->tid == $term_id_to_trigger_show_block) $make_block_visible = TRUE;
}
}
return $make_block_visible;
?>
Reference http://drupal.org/node/320795
Wanted to store this here, I ended up not using it but I wanted to keep it in case I needed it in the future.
<!-- Get taxonomy term, ID 2 (section background image) to write out section header -->
<?php
if (arg(0) == 'node' && is_numeric(arg(1)) && !arg(2)) {
$node = node_load(arg(1));
$taxonomy_terms = $node->taxonomy;
foreach ($taxonomy_terms as $term) {
if ($term->vid == 2) {
$ld_bg = $term->name;
}
}
}
?>
<img src="/sites/all/themes/collective/img/<?php print $ld_bg; ?>_bkg.jpg" border="0" alt="<?php print $ld_bg; ?>" />
Ever have one of those days where it just seems impossible to debug the code? GWO is not your friend or mine when it comes to debugging.
You can easily set up the experiment to look at your staging server and test like that but you are not going to get too many visits and/or conversions since it is a staging environment with only developers and a few others testing on it. When you launch a project on a site with decent traffic, that is when you can start having some issues. GWO and GA usually work together fairly well but I have run a couple of experiments that jogged the GAs numbers as soon as you implemented GWO.
Read more
I just started working with TextMate to see if I can start using it as my main code editor (on my Mac). It turns out to have a nifty “post to blog” feature for use with all of the top blogging platforms (Joomla, Druplal, Wordpress et all).
As nice as the Wordpress API is, I think this may be my new more convenient way to publish my blogs. Publishing from the text editor I do the most work should prod me to blog more often and hopefully better.
Many thanks to Kristan Kenny for her very helpful post.
Seems like that blog has been deactivated, there is plenty of documentation about this on the Textmate site itself, happy blogging!
I wanted to do some experimenting with XSL (extensible styles sheets) and XSLT (XSLT is used to transform an XML document into another XML document, or another type of document that is recognized by a browser, like HTML and XHTML.) I did my initial hunt on the web and came across a pretty thorough tutorial on w3 schools. The most important sentence for newbies to XSLT is the statment “XSLT transforms an XML source-tree into an XML result-tree.”