Basic Content authoring in Drupal
Each node in Drupal has an option to be 'Published' or 'Unpublished Published' under “Publishing Options” in the node edit screen. This enables content authors to be able to create content before publishing it on the live site. The field out of the "core" box can have the values of published and unpublished (this can be extended but that's a topic for another post).
After wrestling with this for a while this evening it struck me that it isn't a very well documented area - so I thought I'd make a quick post as much for my own notes as hopefully assistance for someone else.
The issue: You have some jQuery that runs once the page has loaded and you find that it runs on Ajax post backs .. Ugh!!
The end result is that you get the behaviour repeated every time the code runs - not nice.
The answer lies in the use of the jQuery .Once() - see http://drupal.org/update/modules/6/7#jquery_once
As part of the Brighton Digital Festival and the Brighton Area Drupal weekend Blue-Bag and three other Drupal houses in New England Gouse Brighton UK will be opening their doors this coming Friday.
If you are developing commerce sites and review your logs regularly, chances are you will come across 404 errors looking for crossdomain.xml. We get a lot from the plugins that looks for coupons on e-commerce sites (e.g. Drop Down Deals). In fact you are likely to get them on any sites you develop - but we have seen them more frequently on ecommerce sites.
Expose your Master display!
Now and again a little issue occurs that makes you pull your hair out.
I like to have NO errors on my sites and today whilst refactoring a view kept getting this error: No valid values found on filter: Content. But all my filters seem OK and the views work fine....
It is quite common practice to add head elements such as:
- metatags and links such as webfont links and
- xmlns namespaces
as text to the html.tpl.php or in template.php in hook_preprocess_html etc and other string based ways of doing things.
The problem with this is that it is hard coded and not the Drupal way. I have cobbled together some examples of how we do this in code (most of which have been gleaned from issue queues, posts and other great Drupal.org sources - credit to many anon contributors! The point here is simply to pull together some examples.
We are working on a series of Facebook modules for Drupal at the moment. These enable us to use Drupal to serve facebook applications and integrate the site(s) we are developing tightly with Facebook. We are developing them as a set of submodules (more on that later...)
Using drupal_add_js() in several modules.
We were engaged to create a socially linked ecommerce site for a new brand range of Dickies clothing - Dickies Streetwear. The brief called for a high performance state of the art site that engaged a growing customer base in the streetwear market. So rather than create a run of the mill ecommerce catalogue site we wanted to create a rich user experience based around news and social media with purchasing opportunities presented across the site.
Drupal (pronounced drew-pull) is a Content Management System and web application development software written in a popular scripting language - PHP. Drupal has over 11,000 modules and over 1,000 themes, along with both a point and click interface to allow tech-savvy people to put together websites with no programming experience; and an API and framework for programmers to develop unique applications. Best of all, it's free, open source software!
Wrestling with an error message on a Drupal Commerce site today. I kept getting errors relating to a missing template file with no path and no file name .tpl.php. Fortunatley with a little debugging giving me a pointer to the correct issue queue on Drupal the solution was readily available. So here's a few easy steps to follow in case you have the same issue.
In this post I am going to look at Drupal Commerce and demonstrate how to prepare e-commerce product data for import into Drupal Commerce - and show how to create a delimited list of product references to link the products to their display nodes. These techniques supplement the wealth of great practical demos and documentation provided by the Commerce team.
We were engaged by the History of Parliament Trust to work on their flagship website that publishes the results of research into the members and constituencies of all British parliaments since 1386.
See for yourself at : http://www.historyofparliamentonline.org
This data rich web site is managed by the Drupal CMS and has tens of thousands of 'nodes'.
Finally solved a curious issue that has been nagging me on a test Drupal commerce site.
I have a utility script that lists products that are not linked to Product Displays (handy). Perplexingly the ‘report’ kept showing some orphaned products even though I had linked them all and the report had shown none previously.
It is a test site undergoing some heavy development so at first I put it down to that - rolling the database back and forth etc But today I noticed it and was pretty sure that nothing had changed that could cause such data changes. Could it be some bug in entity API, commerce ? Unlikely! So crack out the deer stalker and pipe lets investigate!
Below are my notes taken as I investigate techniques to achieve my Objective,
(This post is not a normalised set of instructions but the process I went through to figure out the best way to handle multiple currencies c objective)
if I get a chance ill create another post with a normalised set of instructions/explanation.
A client needed implementing a custom teaser/short description for a CCK field (not the body) in his Drupal 6 site. The requirements: if the short description/ teaser is available use it otherwise get the data from the CCK field. It is important to note that Display Suite Drupal module was not available as I think it provides a much better approach (will post about in the future).
I have used the Views Custom Field module , this adds a PHP field that allows us to add PHP code to a view.
Drupal nodes typically have an Edit and View links (rendered as tabs at the top of the node by most themes).
Ever wanted to add you own links so you can add custom functionality?
This can be used to automatically populate node data.
The below example will show you how to add a link titled “reviewed” to an article node type, this link will prompt the user for a comment and set two cck field “reviewed” and “note”.
This is not intended as a real example but as an illustration of the how the following techniques can be used as the bases for the creation of powerful work flow.
The techniques covered are
• hooking into the Drupal menu routing system
• form creation and validation
• node manipulation (node_load and node_save)
• url redirect
- Talk notes from the BAD Monday meetup
By Guy Shneerson of Blue-Bag Ltd (www.blue-bag.com) Guy [at] blue-bag.com
Notes form my presentation at the Brighton Area Drupal meetup (BAD monday) on Monday 18/04/2011 at the Skiff
Thanks to Steve for organising the evening and to all that attended
We were engaged by Pelgrow UK Ltd to develop an online e-commerce solution for their network of highly successful high street pharmacies in London and across the UK. We were tasked with the design and building of the YourPharmacy brand through the design and creation of an online e-commerce store.