Yawd website

Articles Tagged contenttype

  1. How to automatically add taxonomy term relations when adding content in Drupal 7

    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
  2. Admin widget for generic relations in django

    The contenttypes framework adds wonderful functionality for dynamic foreign keys in Django. However, it lacks of a widget to allow the user select the content object from the administrator website. This article explains how to implement such a widget and embed it to your django-powered project.

    Posted on May 26th, 2011 by Pantelis Petridis