taxonomy defaults based on URL arguments
Hello All, I was just thinking of creating a module that assigns default taxonomies inside a node add form based on arguments in the URL, for example: ?q=node/add/page/5/6/7/8 Where 5 and 7 would be vocabularies and 6 and 8 would be the respective desired values to be chosen in the vocab drop downs. The reason for this is that sometimes I want different taxonomies to be chosen by default depending on where I reach the node add form from. I searched for similar modules but they didn't quite implement this functionality as far as I could tell. This should be an extremely simple module to implement, I've done it so many times I felt it just warrants a simple module. So, are there any similar modules available? -- Ashraf Amayreh http://aamayreh.org
I don't know of any for taxonomy, but quicksketch just released a CCK widget for nodereference that does something similar. It could be worth looking into. http://drupal.org/project/nodereference_url I would suggest being more flexible with your path string, though. You want to be able to allow multiple terms to be added in the same vocabulary easily. On Sunday 25 January 2009 7:41:54 am Ashraf Amayreh wrote:
Hello All,
I was just thinking of creating a module that assigns default taxonomies inside a node add form based on arguments in the URL, for example:
?q=node/add/page/5/6/7/8
Where 5 and 7 would be vocabularies and 6 and 8 would be the respective desired values to be chosen in the vocab drop downs.
The reason for this is that sometimes I want different taxonomies to be chosen by default depending on where I reach the node add form from. I searched for similar modules but they didn't quite implement this functionality as far as I could tell.
This should be an extremely simple module to implement, I've done it so many times I felt it just warrants a simple module. So, are there any similar modules available?
-- Larry Garfield larry@garfieldtech.com
On Sun, Jan 25, 2009 at 6:41 AM, Ashraf Amayreh <mistknight@gmail.com> wrote:
I was just thinking of creating a module that assigns default taxonomies inside a node add form based on arguments in the URL, for example:
?q=node/add/page/5/6/7/8
Where 5 and 7 would be vocabularies and 6 and 8 would be the respective desired values to be chosen in the vocab drop downs.
There is http://drupal.org/project/prepopulate which probably does what you want (but with much longer URLs). One note if you do decide to implement this: term ID values are unique so there is no need to specify the vocab that is the container of the term ID. Greg -- Greg Knaddison http://knaddison.com | 303-800-5623 | http://growingventuresolutions.com
participants (3)
-
Ashraf Amayreh -
Greg Knaddison -
Larry Garfield