By mrmagica on
I have used CCK to create a content type which has fields relating to courses run at our College.
I want to create a field that allows a content author to choose the department the course belongs to from a pre-defined drop down list e.g. Art and Design, Business and Management, etc. When a department is choosen I would like the department name to display as a url which links to a specific page on our website e.g. Art, Design and Media will display a link to the Art, Design and Media homepage.
I have tried the link module but this seems to want an author to type in the Title and URL
Any help would be very much appreciated
Many thanks
Comments
It sounds like both
It sounds like both departments and courses are a content type.
I would add a node reference field to courses that reference the department content type. Under Display fields you can set the output format to "Title (link)".
Thanks for reply but...
Hi Thanks for response but departments are not a content type they are a field, Courses is a content type.
Let me try to clarify:
All i want is a drop down list populated by 10 options (list of departments). When someone creates a new course listing one of the fields on the page is the drop down list. Selecting an option from the list (say Business and Management) this will generate a pre-defined link on the page (in this case to the Business and Management page).
Thanks a lot
Could the departments be
Could the departments be taxonomy terms?
- create a department vocabulary listing all the departments
- create a CCK taxonomy field (http://drupal.org/project/content_taxonomy) in your course-node type
The editor will then be able to select from the list of departments.
In the completed node, clicking on the selected department will then lead to the page for that department, listing any nodes (courses and whatever else) classified within that department
We understand you perfectly,
We understand you perfectly, but I think that nevets's advice is the correct way to resolve it!
No, they are a content type
>> departments are not a content type they are a field
No, they are a content type. They have, at a minimum, a title and a URL associated with them. The best way to create them is as a content type.
A list of some of the Drupal sites I have designed and/or developed can be viewed at motioncity.com
I'm very interested in this
I'm very interested in this subject too so hope you find a solution and will report back here.
I think this message is better than just writing "subscribe".:-)