Hello: I am new to the list and am wondering why I cant get so little support with Drupal (either thru forum/documentation/search ), so this is my last attempt to get somewhere.
I am creating new nodes in my module which I want to relate to an existing category. Does anybody know how to do this? Thank you Manfredo Hopp
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Ingeniería de Sistemas wrote:
Hello: I am new to the list and am wondering why I cant get so little support with Drupal (either thru forum/documentation/search ), so this is my last attempt to get somewhere.
I am creating new nodes in my module which I want to relate to an existing category. Does anybody know how to do this? Thank you Manfredo Hopp
First go to www.example.com/admin/content/taxonomy (where www.example.com is your site), and click on the category you would like to use. Scroll down to where it says "types" and check any node types that you want to use this vocabulary with.
Then, when you create or edit a node of any of the types you checked, there will be an opportunity to select the taxonomy terms you would like to associate with it.
Hope that helps,
Susan
Thanks Susan for your prompt answer I am mot sure of how good my english explained my problem. I am creating a node thru drupal_execute('story_node_form', $values, $node); The node is created but I want to make it under certain category which I dont know hhow to do. Any idea? Thanks Manfredo
Susan Stewart wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Ingeniería de Sistemas wrote:
Hello: I am new to the list and am wondering why I cant get so little support with Drupal (either thru forum/documentation/search ), so this is my last attempt to get somewhere.
I am creating new nodes in my module which I want to relate to an existing category. Does anybody know how to do this? Thank you Manfredo Hopp
First go to www.example.com/admin/content/taxonomy (where www.example.com is your site), and click on the category you would like to use. Scroll down to where it says "types" and check any node types that you want to use this vocabulary with.
Then, when you create or edit a node of any of the types you checked, there will be an opportunity to select the taxonomy terms you would like to associate with it.
Hope that helps,
Susan -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFGvP0NvWyNbJGZcawRAiQsAJ4z+sBvnLnViToNqXNOxFHn25y7gQCbBrup vbxaToWQxQgwxiUiyKZBqLA= =0EoJ -----END PGP SIGNATURE-----
Manfredo,
Start here: http://drupal.org/node/299
Then go down to the "Modules that do more with categories" post. Install some of the modules that look like they may be doing something similar.
Take a look at the function taxonomy_save() in taxonomy.module. Create some nodes, put them in categories (I think you're talking about using the core taxonomy module), and walk through the code that saves the nodes to the database.
These things ought to get you started ... if you've already done all that, then we'll need a little more information as to what your exact problem is. When you've got it figured out, it will be worth a post on Drupal.org if you think you'll be able to help someone else out.
Marc
Ingeniería de Sistemas wrote:
Hello: I am new to the list and am wondering why I cant get so little support with Drupal (either thru forum/documentation/search ), so this is my last attempt to get somewhere.
I am creating new nodes in my module which I want to relate to an existing category. Does anybody know how to do this? Thank you Manfredo Hopp
Thank you Marc , as I can see from your reply I should have stated that I am working with categories module, which I belive is NOT the official Drupal category functionality. So thats why I maybe am being stucked with the problem. Should I start all over or is it worth trying with this module? What I am trying to do is to set up a dinamic category tree using category.module, sorry (: I dont want to create the full tree in advance because of the extension, but let the user create the path he/she wants to see choosing from a combo. After path creation I also want to add a story node to that path and that is the point where i am stucked. Is this idea mad or bad ? Thank you. Manfredo
Marc Poris wrote:
Manfredo,
Start here: http://drupal.org/node/299
Then go down to the "Modules that do more with categories" post. Install some of the modules that look like they may be doing something similar.
Take a look at the function taxonomy_save() in taxonomy.module. Create some nodes, put them in categories (I think you're talking about using the core taxonomy module), and walk through the code that saves the nodes to the database.
These things ought to get you started ... if you've already done all that, then we'll need a little more information as to what your exact problem is. When you've got it figured out, it will be worth a post on Drupal.org if you think you'll be able to help someone else out.
Marc
Ingeniería de Sistemas wrote:
Hello: I am new to the list and am wondering why I cant get so little support with Drupal (either thru forum/documentation/search ), so this is my last attempt to get somewhere.
I am creating new nodes in my module which I want to relate to an existing category. Does anybody know how to do this? Thank you Manfredo Hopp
On Friday 10 August 2007 17:36:36 Ingeniería de Sistemas wrote:
What I am trying to do is to set up a dinamic category tree using category.module, sorry (: I dont want to create the full tree in advance because of the extension, but let the user create the path he/she wants to see choosing from a combo. After path creation I also want to add a story node to that path and that is the point where i am stucked.
Maybe this is what you are looking for: http://api.drupal.org/api/function/taxonomy_node_save/5
If not, try searching for taxonomy to see what else shows up.
It is something the like, but I want to make it thru api drupal_execute('story_node_form', $values, $node) with the correct values for parameters $values and $node.
As I could see this should be somethimg around the following: $node= array ("type"=>"story"); $values['title']= 'title'; .... $values['category'] = array ("[nn]" => $cid); drupal_execute('story_node_form', $values, $node); where nn is the container for the categroy and cid is the last category of the path.
(This is taken from node values after submitting a form, based on a handfilled story form related to a category)
Jason Flatt wrote:
On Friday 10 August 2007 17:36:36 Ingeniería de Sistemas wrote:
What I am trying to do is to set up a dinamic category tree using category.module, sorry (: I dont want to create the full tree in advance because of the extension, but let the user create the path he/she wants to see choosing from a combo. After path creation I also want to add a story node to that path and that is the point where i am stucked.
Maybe this is what you are looking for: http://api.drupal.org/api/function/taxonomy_node_save/5
If not, try searching for taxonomy to see what else shows up.