Adding item to taxonomy menu vocabulary in the create content form? - drupal

I've implemented taxonomy menu in Drupal, and trying to set it up so that it is pretty easy for the user to add new items to the vocabulary from the create content form instead of having to administer the vocabulary itself.
So far, all I can manage is the default behaviour of displaying the existing items.
Edit:
Enabling the 'tags' option for the vocabulary does not allow the desired effect - I want the parent/child structure and drop-down menu in the create content form as well as the ability to add a new tag to that drop-down.
A bit more explanation as to why - I'm trying to create an image gallery using a hierarchy of tags (so, sports > soccer > match on 31st May) - the problem is that the general content creator for the site is non-technical, and I'd like to avoid having to make them work through the taxonomy/vocabulary items interface directly.

I think you're looking for the Hierarchical Select module.
Take a look at the last demo at the following page:
http://wimleers.com/demo/hierarchical-select/taxonomy

What you're talking about is called "tags" in Drupal. You want to check the "Tags" checkbox on the vocabulary edit page and that will change the interface on the content entry forms so users can add new terms/tags.

Related

Best way to create content type and taxonomy on Drupal 7

I'm going to try to explain my project.
I have one section to create on my drupal's site called "Press Room" in this section the users access it via menu item called "Shows". The mainly idea is that the second level of this menu will be created with taxonomy vocabulary called shows and the terms of this are for example:
-Shows(Voclabulary)
-Heartland(term)
-Bulloch Family(term)
And now the next step is create for each one of the terms the next structure:
-About
-Press Materials
-Video
-Fotos
To be more specific I've attach two piece of wireframes of these.
What is the best way to do that?
Thanks!!
[The menu show like that][1]
![The content once you click in the menu][2]
http://i.stack.imgur.com/tijAU.png
http://i.stack.imgur.com/1oifQ.png
I can propose a solution although there are too many options here.
1) Heartland(term) -Bulloch Family(term): there is no need to use taxonomy terms, they can be node types (let's call it "Show" content type).
2) About, Press Materials, Video, Photos and Contact will be 5 node types too. But these will have a reference field to the node types above (Shows).
3) The display page of each Show will be a views that will display the node Show and the content that are referencing this node.
4) Menu can be created by hand (if shows are not too many) or by a views that will show a list of node links.
Examples:
http://ericgilbertsen.com/2013/06/create-related-content-blocks-drupal-7-views-entity-reference
http://www.webomelette.com/related-content-block-views-drupal-7

Drupal Views of nodes to show node comments

I've encountered a Drupal problem: I'm using the Views module for rendering nodes of a kind, based on the user id of it's author (it is a Content Profile actually). I want the view to show the comments for the node, just like in node/%. I could not find any option in views or any relevant module. Am I in the wrong direction and should reorganize stuff for this...?
Any ideas, how can it be done?
Regards,
Laci
Using views is really not the best plan of action. You should instead create a node template in your theme and customize it. If needed you can put some logic in a preprocess function. It requires more coding but will get you where you want.
If you use view node display type
Check in it's settings show comments
if you use view fields display type
Use relationship to comments and select fields you need and theme them
I know this is old request, but I was just struggling with the same issue and came across this post. I thought it'd be helpful to share my solution.
I'm using Drupal 7, with Views 3 and Display Suite.
In your view, choose the display in question.
Under Format, click the first link to the right of 'Show'.
Choose 'Content' (or 'Display Suite' in my case).
Click 'Apply'.
On the next screen, you'll have the option to 'Display comments'. Check this box and save your view.
You should now see the comments displayed under each item in the view.
You could create a second view (with URL e.g. /comments/% where the placeholder will be the node ID, and not the comment ID) that lists comments for a given node, with a contextual filter to only show them based on the NID in the URL.
Then, add that view to the footer (as a 'view area') of the single-node view you've already got.
There's some tweaking required for layout (inline fields etc.) but the basic structure should work.

How to create a simple company blog with a Tag-Cloud in Drupal-6?

I have to create a simple company blog within drupal-6. That means there should be only one single blog each user can post into.
What i have done so far is to create a custom content Type (blog) and a view that displays teasers of the recent blog entries with links to the full blog post.
Now i have to create a Tag-Cloud for this blog.
I created a taxonomy vocabulary for this "blog" content type and set the settings to Tags (Terms are created by users when submitting posts by typing a comma separated list.)
I also installed the Tagadelic Module and created a tag cloud with it, that works great and it displays all the Tags i entered when creating new blog entires.
But now to my problems:
First: If i click on an entry in this tag-cloud the default Taxonomy_term view is used to display the resulting blog entries. Thats bad because i would like to have it displayed the same way as in the view i already defined to show the blogs. Is there a way to use my view to display the results of the tag-cloud?
Second: On my view, below each blog-teaser should be a link to related blog entries (the ones that share the same terms). I do not have a clue how to do that.
is this even possible with the setting i have now or should i maybe take a whole other approach to create that company blog with tag clouds and related blog entries?
You should be able to solve both problems pretty easily, while keeping your current approach:
Take a look at your views list ('admin/build/views/list'). You should see a view called 'taxonomy_term (default)', which is usually disabled by default. This is an optional override of the built in taxonomy term page. You can enable this and configure it to look like the blog view you created.
Alternatively, you could leave that one disabled, but add another display of type 'page' to your already existing blog view, and configure that as an override to the built in taxonomy term. For this you'll need to set the path of that display to 'taxonomy/term/%' and adjust the display to use the term id argument as a filter (look at the above override for how this works).
You could also do it the other way round - use the default taxonomy_term override view, configure its output according to your blog view needs, and add another display for your recent blog entries to that. After this, delete your own blog view and use the new display of the taxonomy term override instead.

Creating content in a block in Drupal 6

By default for creating content a new page is opened. I want to do this inside a block. A block where there will be some fields like title body taxonomy terms and a create content button. How can I do this?
The form block module will do what you want.
You could you do the same thing in code, using hook_block to create a block. And using
drupal_get_form to render the form.
Try the Panels module.
http://drupal.org/project/panels
It will let you override and re-arrange the node add/edit form.
But, as Jeremy stated, to use this form on other pages of the site you will need to do something custom like hook_block and invoke drupal_get_form.
I agree with the answers from Jeremy and Kevin, but want to give another one.
You can use views to create the block! All you have to do is create a new view display with a block display. Add the fields you want to show, add a link field for the node/add/foo link and give it a node id filter or default argument. Here you have to choose the node id of the node to display in the block. Done!
What's nice with this solution? You can use almost every feature of views theming, drag and drop field ordering, adding new fields is cheap and no extra modules. ;)
Regards
Mike

How do I add items in Primary Links automatically as soon as some user publish new content

I am building a website www.etutornetwork.com, in top menu I have included a link to a new content type [services]. I want to add a link in dropdown menu as soon as I publish new content in services.
Please Help, Thanks in advance.
and one more question, I dont want to give any name to one of the menu in the site. I tried using or leaving it blank, but it does'nt like this.
You can attach it in node creation time (see Menu fieldset), or use module like Auto Menu. Some more details about this module (from its project page):
The Auto Menu module automatically generates menu entries on node creation/edition. Parent menu item can be specified on a per content type basis.
This module acts when the menu section of a node is left empty only. So, users can still organize menus manually. Moreover, default setting for content types is to not create menu items automatically.
I use Taxonomy Menu, to create my secondary menu. It is very flexible to use. Some more details about this module (from its project page):
Features
Custom Menu per vocabulary
Uses the default taxonomy term path or custom paths
Integrate with Views
Integrate with Pathauto: use URL/path aliases
Does not interfere with other menu modules
You can take away the permission from users dealing with menus. Then when you are publishing submitted content from them, you can assign them a menu entry and control the title.
Other than that, you could use Views (since Services is a content type) to create a block that lists all Services with links directly to the node.
Either way, someone will have to title the nodes/menu items. It's easier administrative wise to remove menu permissions from users submitting content.

Resources