New answers tagged nodes
2
votes
Accepted
Field values in node HTML body
It sounds like you need to use tokens. Drupal core has token functionality built in but doesn't include fields.
Have a look at this module it adds token support for fields https://drupal.org/project/...
- 141
1
vote
Use AJAX On Node Add Form To Change Field Required Status
Changes to the form must be made in the form definition, and cannot be made in the ajax callback, as Drupal has already cached the form by the point of the ajax callback, so even if you figured out a ...
- 16.4k
0
votes
How can I embed a View inside a content of a node?
You can use https://www.drupal.org/project/views_entity_embed. It allows you to embed views in textarea using WYSIWYG editor.
2
votes
Accepted
Statistics counter based on user role
The statistics module adds a js library to the node build. You can remove it if you don't want to count the node:
mymodule.module
/**
* Implements hook_ENTITY_TYPE_view_alter() for node entities.
*/
...
- 93.7k
0
votes
How to remove author field from the 'advanced' field group on the node edit form
This works... though it doesn't look quite right to me.
function MYTHEME_form_node_form_alter(&$form, \Drupal\Core\Form\FormStateInterface $form_state, $form_id) {
$form['author']=['#group'...
- 193
1
vote
Limit the number of nodes per User
To limit users from adding more than one node for a specific content type, you can use the hook hook_form_alter() to alter the node form and disable the submit button if the user has already created a ...
Top 50 recent answers are included
Related Tags
nodes × 75207 × 2390
entities × 1135
views × 1043
8 × 860
theming × 724
users × 543
taxonomy-terms × 411
forms × 393
hooks × 284
6 × 283
media × 227
database × 209
rules × 192
blocks × 183
files × 146
javascript × 119
routes × 119
navigation × 118
i18n-l10n × 108
ajax × 105
comments × 95
webforms × 94
9 × 94
importing-exporting × 88