Auto-generate title field from other columns of Drupal 7 Content Type - drupal-7

I'm struggling to adjust title field of my "car" content type in Drupal 7. How can I automatically generate title field text by combining for example Manufacturer, car Model, Year columns? Also if you could comment on good use of title field and tactics to avoid/remove it.

You can use the Auto Node Title module.
"auto_nodetitle" is a small and efficient module that allows hiding of
the content title field in the form. To prevent empty content title
fields one can configure it to generate the title by a given pattern.
When the token module is installed it's possible to use various node
data for the auto generated title - e.g. use the text of a CCK field
(since 5.x).

Automatic Entity Label is a generic approach. Works with any entity type. Uses Token module.
"Automatic Entity Label" is a small and efficient module that allows
hiding of entity label fields. To prevent empty labels it can be
configured to generate the label automatically by a given pattern.
This can be used on any entity type, including e.g. for node titles,
comment subjects, taxonomy term names and profile2 labels.

Related

Use plain text field without taxonomy to achieve tagging in drupal 7

Using node reference is too heavy and I don't want to use taxonomy. What I want is to to use text field. But I don't want user to type the text but choose from a list of options instead.
So this text field can get from somewhere its own data source like some tags, then user select the tag, then the text field will be filled with the tag text.
The data source would preferably be configured as a variable.
I couldn't find any module to accomplish this yet.

Drupal 7 Views: Term filter with relationship

I have 2 content types:
One content type is named: "Offer". This content type includes a reference field to choose one hotel, form the other content type: "Hotel". The content type "Hotel" has a term reference field called "sports".
Now I want to build a view filter, which uses the content type "Offer", and uses the sport terms which i get over the hotel relationship.
I already tried to create a relationship on my own:
Reference to the hotel
Added taxonomy field sport with the relationship to the hotel, which i created before
Then i added the taxonomy field to my filter, and selected the Relationship in the drop down menu.
But this doesn't work at all.
Anyone can help me?
Regards M.
The view should initially return the hotel content type.
Add a optional relationship to the offer reference field, this will give you access to the fields in the offer content type. Once you've done that you should be able to add whatever field you want as an exposed filter.
To get the sports working you may have to add the relationship Has taxonomy term in order to get what you want and then add the term as an exposed filter.
Use the patch over at https://www.drupal.org/node/1492260 for autocomplete.
A select list should work the same way as with this patch, but it's built-in. In either case, you have to enable it by checking the checkbox in the content type field config.

Drupal dynamic Taxonomy term values

I'm new to Drupal, and somehow miss a feature. (or I guess just don't know how to activate it)
Let's say I have a content type which is using the term reference (taxonomy field type)
Is it possible to have it filled dynamically (e.g. with already existing content from my site?
I don't want to type in all possible Tag/Term options, but instead want some kind of dynamic category choice for an author, e.g. feeded by existing content (articles/pages) from the drupal site itself.
Is there a certain module I need or how is it done?
If you want to add to your nodes a reference to another node in your site you need to use a node reference field and not a term reference. To be able to add that kind of field to your content type, you need to install References module, and probably Views to show pages that leverage your references. If you provide some details of your requirements I can be more specific.

drupal 7 metatags by content type

I have different custom content types which need completely different tailored for them meta description tags. I have installed the metatags module, however, it gives the possibility to add description meta tags on a site-wide basis and not by content types. The same is with page titles (tho, this can still be solved with the page title module). So i wanted to ask if anyone might know of a good solution to this?
I was also thinking if there is a way to use conditional operator for token, for example, to see if a field is set for a particular node, then add the content of the field to the meta description/keywords.
You can add content type specific meta tags at /admin/config/search/metatags/config/add. There's a drop-down list that lets you create default metatags by a number of entity attributes, including content type.
I've never integrated tokens with metatag but it appear to be adequately supported.

When creating a Drupal 7 content type programmatically, is there a way to add tuples of fields?

In Drupal 7, I'd like to create a Person content type. A person may have multiple profiles - an administrator should be able to select which profile will be considered the primary one. So, that means that I need a tuple consisting of:
A textarea, for the profile text
A checkbox, indicating that this is the primary profile
A textbox, for naming this particular profile
I need functionality to behave like that of any of the lists: I can click "Add another Item", and a set of all three of these fields will appear.
I have a vague idea of how this can be executed, but it involves using the form API to add fields before the form renders each time, as well as the necessary AJAX behavior. This seems a bit overcomplicated, since this would also necessitate creating an additional DB table to hold these tacked-on fields.
Is there a relatively simple way of doing this solely through hook_install()?
You can use drupal.org/project/profile2 or you can complete it using standard Drupal functionality, i.e. create a content type named, let's say, 'myprofile' and add all the fields use need. Then add a nodereferece (http://drupal.org/project/references) field to the user standard profie that would point to your 'myprofile' content type.
So all the 'myprofile' content, created by that user would be his profiles and the one pointed in his standard profile will be his default.
I hope it's clear enough )

Resources