Articles Tagged drupal
Drupal provides a nice API for anyone that needs to process a massive amount of data: the Batch API. This allows for running heavy scripts split into multiple operations while providing a progress bar to monitor the process' progress. However this API is not adequately documented and I had a hard time trying to resolve some issues I come across. I thought of sharing my findings in case someone else needs this.Posted on July 13th, 2011 by Pantelis Petridis
Let's suppose we want our Drupal article content type to have a parent category and a sub-category. We have defined a 'categories' vocabulary and we are also able to add new terms and set their parent elements. When using the administration UI to add a new article we can create a new category, set a new sub-category and both taxonomy terms will be saved along with the article. However, the sub-category won't be connected with its parent category automatically. We need to manually visit the taxonomy terms list and set the sub-category's parent category term.
This is a problem I came across when working on a yawd project and to solve it I had to create a simple module that programmatically correlates the sub-category with its parent category field...Posted on June 29th, 2011 by Pantelis Petridis