I have a taxonomy attached with my content type. While creating node of that content type I see "- Choose one -" value in the drop down of taxonomy. I want to remove that and want to set default value to a specific term. What could be the preferable way of doing this? I also don't have much experience in Drupal.
I am able to resolve the issue now. Just added the following line in my form alter
unset($form['taxonomy'][$vocabulary_id]['#options']['']);
Related
Is that possible, in Drupal 7 or 8, to use multiple content type in a single view, ordered by a taxonomy that those are shearing.
For now, i get to have one content type, ordered by his attached taxonomy, but i can't figure out how to add an other content type witch is using the same taxonomy.
The difference between the two content type is that the first one have two more field. The second one will have later an other field.
Is that possible and how to do that?
Thank's !
Yes it's possible and if your question is full detailed very easy:
Just open in "Filter Criteria" filter called "Content: Type" and in opened window choose "Is one of" at the right part and your content type(s) at the left part
I have some texonomies in my Drupal website. Some of them have additional fields. I have some fields of type Term reference in my content-types.
When I am creating a new node of a content-type, I would like to have the ability to add a new term to the taxonomy while I'm filling the form of the Content-Type (with an "add item" link/popup...).
I can do that if I use Entity Reference fields, but I cannot using Term reference field. Could you help me, please?
Thanks
UPDATE: I installed "Taxonomy access fix" module (https://www.drupal.org/project/taxonomy_access_fix) and it allows me to set capabilities per each taxonomy based on user role. Now I only need to add a new term to a Taxonomy on a form level using Term reference field (I canno use autocomplete because I need the user to see all possible values like with a dropdown).
Any help?
If you change your widget to the autocomplete widget, it will let you add new values.
I agree with #Dark FlameS, in fact we are using the autocomplete widget for some of our students to add types of trees in the biology lab and they tag each with the scientific name.
And since we dont know these scientific terms, we let them add taxonomy terms to the list.
Slight difference however, we use the module Autocomplete Deluxe. Works like magic for us.
You are able to see what taxonomy terms are already available by clicking into the text area.
And as you type a taxonomy term, you will see what other terms are similar. If a tag is new, it will be added. one thing, dont allow them to delete your tags. We learned this the hard way.
See the image below on what it looks like as you add a tag.
Above is what you will see when you are adding the taxonomy field in your content type, this is after you install the Autocomplete Deluxe module
Above is What the user sees when they add or select a taxonomy tag.
I would like to know how to filter view (block) according to content of one of my fields in that view.
E.g. I have added to my block view a field called Car description, which contains a text with something like "This car is convertible and the best on the market." etc.
Now, I want in filers section set up a condition to show just that content which contains in the field Car description a word convertible.
I was wondering that if this is not possible, I can maybe create a custom field which will contain a PHP code with condition if else, so the result of this custom field could be 0 or 1 and then the filter could check it better.
However, I think that filter is applied before any of the fields are populated, but maybe I am wrong.
How to solve this problem? Did anyone dealt with similar situation?
Thanks in advance for your advice.
You should use views filters.
In filter settings you can specify properties of that filter. For example you can check field for containing word 'convertible'.
However for your case I would use taxonomy. 'Convertible' word is a good candidate for taxonomy term.
I have a parent/child relationship (based on the cck node reference field).
Recipe Group contains a node reference to the type Recipe. It's a 1 to many relationship.
What I need to do is create a view that displays the recipe group information, and then under it, the recipes that have been assigned to it's cck field.
So
RecipeGroup1 - Title
Recipe1, Recipe2, Recipe3
RecipeGroup2 - Title
Recipe4, Recipe5, Recipe6
etc etc
I've created the view to pull the list of recipe groups.. but I have no idea how to retrieve the recipes that belong to the group?
I've tried googling, but we are on a tight time line and would appreciate any assistance.
Thanks.
Take a look at http://drupal.org/project/views_field_view. It lets you combine two views (groups, recipes), inserting the recipes view as a field into the groups view. Using this, you can have as many fields as you want for the group.
You can use the Views attach module to associate a view with a specific content type and display that view on that content type's node page.
There is a webcast here that demonstrates how the module can solve a problem similar to yours.
However, the webcast assumes your nodereference CCK field is on the child content type and is pointing to the parent content type, not the other way around like you have it.
Instead of using the nid of the recipe group as an argument to the view (as shown in the video) you may be able to use one of the recipe group's tokens (the nodereference field referencing its children). You can see that option at 9:32 in the video.
Whatever you decide to do, I think Views attach will likely be your answer.
Include the cck reference node field as an output field to your view. After, you can 'rewrite the output of this field'.. so that it looks however you want.
add noderefernce field in to views fileds
select check box to group field result in node ref field settings
theme that field as you want
I'm still young at Drupal.So please correct me wherever needed.
I have a requirement wherein I want my content type to have my own fields (achieved with CCK), then I want one of the fields to be a selectable drop down and each drop down value should actually categorize them so that each type can come on separate page. This I managed with taxonomy. And in addition to these,I wanted some other fields in the same content type to be dependent on a particular value in the drop down. So I used conditional fields. And in order to use taxonomy term as field,I used content taxonomy. But unfortunately, conditional fields doesn't see the content taxonomy drop down (it works perfectly well if its a normal non-taxonomy drop down).
So basically,
I want content to be separated (i.e.
on different pages) on the basis of
a value selected from drop down.
And if a particular value is
selected from drop down, few other
fields should become visible.
How am I to incorporate these things? Am I on the right track or completely off track?
I am using Drupal 6.14. :)
Thanks for all the help!
I think you are on the right track, but the Conditional Fields is still in beta, so bugs/missing features are to be expected. Also, Content Taxonomy is a bit special compared to other CCK modules, as it only provides a replacement of the taxonomy fields on node edit forms, but is not present/active during node rendering.
That said, your Problem is already filed as a feature request in the issue queue of the conditional fields module, and there are some patches available and discussed to solve it - so you might want to check out that thread.
I'm not completely sure how you require the 'different pages' part to work, but if everything else works with a non-taxonomy dropdown - and you don't have time for the issues with Conditional Fields to get shaken out - then you may be able to set up a View page that filters on the value of the CCK node.