This tag is for questions regarding the use, reuse and manipulation of nodes, the most basic form of content on a Drupal site, and the API used to manipulate them. While nodes are implemented as entities in Drupal 7, this tag should be used instead, unless specifically referring to Entity API ...

learn more… | top users | synonyms (4)

0
votes
1answer
10 views

hook_entity_view_alter - redirect

First up I'm very new to the Drupal way of things but have jumped on board with Drupal 8 and quite excited about the possibilities. What I'm trying to do is redirect the default node view route (i.e. ...
0
votes
0answers
11 views

How to get field tags and categories from Node [duplicate]

This is my node object $node = Node::load(1); How can I fetch field tags and categories from this object in Drupal 8 ? In Drupal 7 It was fairly simple. $node->field_tags["en"]; $node->...
0
votes
2answers
30 views

I can't show the body content with full HTML

My fresh installed Drupal 8 site can't display articles that use full HTML. Is that normal? Using the Full HTML input format, it appears like this. I have to change the input format to Basic ...
0
votes
1answer
14 views

List publications by same Author on Staff page

I'm using the biblio module to manage publications on my site. I've a content of type "Staff" that display all workers. These workers have publications that are listed on the publication page (using ...
1
vote
1answer
27 views

How Can Create Node Info Bar (or Node Info Block)?

I want to create a teaser with belove sections: 1- Title Section. 2- Information Section (Info Bar): When this Node Writed? (Date & Time). Whom is writed this Node: (Author of Node). What ...
0
votes
1answer
16 views

Content Type Segmentation

I need to know if there is a way to create a content type and within the content type to create a field which this field should be segment. For Example : at the beginning i will have an image, this ...
-2
votes
1answer
22 views

db_select order by custom field value

I need to get all nodes of some content type and order them by integer field of this content type. $nodes = db_select('node', 'n') ->fields('n', array('nid')) ->join('...
0
votes
1answer
17 views

Adding markup to fields in block plugins

I'm attempting to create a block plugin that renders nodes retrieved from a query. I'm able to successfully get the node id's and field values from the query but I'd like to wrap each item in divs and ...
0
votes
0answers
13 views

Programmatically create a node with a menu link

I created a node programmatically with the following code. $data = array( 'type' => 'inception_article', 'title' => $msg->name, 'body' => array( 'value' => $msg->body, ...
-1
votes
0answers
6 views

Drupal Menu usign Carousel [closed]

I have 2 pages: http://www.locnstor247.com/tips/packing-tips and http://www.locnstor247.com/tips/storage-tips The packing tips is working fine for the carousel links from right sidebar, but for some ...
2
votes
0answers
92 views
+200

Views: Show all terms of taxonomy with or without containing nodes

I have a view which shows all terms of a specific taxonomy (pages). My terms have a relationship with containing nodes. My nodes are grouped by taxonomy terms. I get this result with no date filter: ...
0
votes
0answers
32 views

Get node visits number in node template [duplicate]

I enabled statistics module and then now I want to get the node view number in node template file.how can I get the number of node visited in node template? I overrode node template files:node--blog....
2
votes
1answer
41 views

Get select list Value in node template

I have a integer selection list field in my content types with some key|Value options. 0|CEO 1|CTO 2|Manager now in my template I want get value. I try {{node.field_positon.value}} but it return ...
1
vote
1answer
7 views

Drupal commerce taxonomy

I have made taxonomy categories for products, and block where is category link list, but how I can make target url for these categories and when user go to category link there is page and all products ...
5
votes
2answers
80 views

How to delete a node or a list of nodes with Drush?

I discovered the Delete all module which gives you the ability to delete all the nodes of a given content type. However, with this module you can't delete a single node or a list of nodes. In the ...
1
vote
1answer
45 views

Saving and retrieving value in hook_node_form_alter()

This is in Drupal 7. I have managed to add a section to the node vertical tab. But I have not found out how to save the value and retrieve the value. After saving the node if i go back to the node ...
0
votes
1answer
43 views

Related articles with comments

I've been made module that shows related articles and based on taxonomy tags. My problem is that, it listed related articles where is no comments too. So I want that shows only these articles where ...
1
vote
2answers
40 views

Can you suggest any alternative for Statistics module? [closed]

We have a pretty descend traffic to our Drupal website, approximately 600 page views per minute. We have enabled the Drupal statistics module for storing the node page views. At peek traffic hours, ...
0
votes
0answers
17 views

Entity Admin UI as Node Tab Link

I have an entity "metric" that has specified the following admin ui config: 'uri callback' => 'metric_entity_uri', 'admin ui' => array( 'path' => 'node/%/config', '...
1
vote
1answer
34 views

How to use the Save Draft module for a particular content type only?

I Want to use the Save Draft module for a particular Content type. When i install this module by default it will be applied for all content type.Please let me know how to avoid this. Note: I'm using ...
0
votes
0answers
34 views

Teaser display showing on full node content page

as my title says my teaser display had been showing up on the full content page of my nodes and we can't seem to figure out "Why". The content type has 2 views and 2 blocks. One view with all One ...
0
votes
0answers
21 views

search node for taxonomy fields: performance considerations

On Drupal 8, I am using taxonomy membership in a breadcrumb builder: every node not explicitly on a menu will have to be checked for membership in a taxonomy. I haven't come up with a better way of ...
1
vote
0answers
6 views

How do I import editable copies of an existing “child-node” into a “parent-node”?

Here's what I need: I want to be able to import content of selected existing nodes (let's call them child-nodes) into a new node (let's call it parent-node), and I want to be able to edit the child-...
0
votes
2answers
34 views

How to add extra data to a programmatically created node

Using Drupal 8 i am importing data from an external source and creating the node programmatically from the controller: $node = Node::create(array( 'type' => 'article', 'title' => 'some ...
0
votes
1answer
36 views

What is an alternative to hook_node_view()?

When a node is rendered in a panel pane, hook_node_view() is not invoked. (I use Panels 7.x-3.4.) Is there any alternative to change rendered node content in any other hook? I have tried with ...
0
votes
1answer
23 views

Body field data not showing in View or Edit mode but exists in database

This is very similar to this question, except there the asker answered with a solution that is not relevant. Scenario: made a copy of a D7 site in order to apply new theme. All content types etc seem ...
0
votes
0answers
43 views

How do I get all the referenced taxonomy terms without the field name?

I have been looking into entityQuery but haven't seen what I am trying to do yet. If I have a node object, is it possible to get all taxonomy terms referenced by the node object, regardless of the ...
1
vote
1answer
11 views

How to display node when view contains only 1 item?

I have a custom view which displays all nodes of a specific content-type off the main menu. You can click on any of the teaser headers and see the individual node data. I have been asked to display ...
0
votes
1answer
10 views

Display multiple node edit forms on one page with one submit button

Is there a module allowing to edit nodes as a list, like in a spreadsheet, not one by one? For example, display a list of nodes on a page (e.g. 100 nodes) with each node having input boxes instead of ...
0
votes
0answers
12 views

Custom Text Edior Permission Problems

I created a custom Text Editor to be used by Content Editors which prevents them from being able to add source code, images, tables, etc. Basically I just want them to be able to add text, format that ...
1
vote
1answer
34 views

How to set and inherit variables within different twig templates?

I'd like to set a variable in my node.html.twig template: {% set title = label %} {{ content }} The content consists of one field visible only, which has it's own template: file-link.html.twig ...
1
vote
1answer
16 views

How do you programmatically create a webform with a managed_file type?

I haven't been able to find a single example of how to create a webform with a managed_file type. The webform initially had the type 'file', but needs to be changed to accept multiple attachments. ...
0
votes
1answer
15 views

How to make a template for content type with panels

I´ve created a content type "Products" with "N" fields and I try to create a template for this content type, each product should have its own page. How I do this?
0
votes
1answer
34 views

How do I find all objects under an object?

When I try to print out the possible options of Node::load(10) I just get null. But I know that there are options as Node::load(10)->field_name->value gives the value of the field. I have ...
1
vote
3answers
83 views

How to use menu_get_object()?

I was using menu_get_object() to load node information in Drupal 6. if ($node = menu_get_object()) { // Get the nid $nid = $node->nid; } Since menu_get_object() is deprecated in Drupal ...
1
vote
1answer
39 views

How do I find a template?

How I determine which template or form is responsible for processing node of page with this URL: mysite.com/node/node-number/edit ? I think, that Drupal find the template of edit in this files: page-...
0
votes
2answers
11 views

Views contextual filter pages and duplicate content?

I just picked up a site that has its content represented by views pages with contextual filters instead of content pages, meaning that the content is available in two places. For instance, mysite.com/...
0
votes
1answer
12 views

Version control on Entity form type submissions

A project collecting data from multiple entity forms was handed over to me. My client requested the implementation of a review mechanism for the data that are stored in entity form submissions. The ...
0
votes
1answer
53 views

How to get Node Title and description when nid is avaiable?

In Drupal 7 I am using following code in Global: PHP. $data = message_load($row->mid); if (isset($data->field_related_flag)){ $fid = $data->field_related_flag['und'][0]['target_id']; $...
0
votes
0answers
18 views

Post date results in WSOD

Any view that contains a reference to the Post Date gives a WSOD. There are no log entries in Drupal or Apache and adding: error_reporting(E_ALL); ini_set('display_errors', TRUE); ini_set('...
0
votes
1answer
8 views

Multiple Field Values on Separate Page

I have multiple values for a field in a node, and am displaying only the top 5 using CSS, however, I would like to display the full list of values on a separate page with a, 'View More' link to that ...
1
vote
1answer
37 views

Unable to loop through all nodes in a content type and load them without hitting memory limits

I'm having an issue in Drupal 8 where I am unable to loop through a large amount of nodes without hitting memory limits. The products content type in the below example has ~6000 nodes. The memory ...
3
votes
1answer
27 views

How to flag node when “event date” has passed and send notice to authors of flagged nodes?

I have a "delivery date" field in my content type that users choose when creating a node. When this date passes I want the notice to be sent to the nodeauthor. As far as I see, I need to flag the ...
0
votes
2answers
30 views

Node specific template with custom html header

From time to time I have pages within the Drupal architecture that I don't want to use the standard page.tpl.php.tpl and html.tpl.php. I want to create a template for specific nodes that uses a ...
0
votes
2answers
33 views

How can I edit the 'Title' field label of a Node content type within a module?

I'd like to do this in Drupal 8: I need to change the label of the Title field on a custom content type without using admin panels. I know this is possible via the admin menu, but I feel like I ...
1
vote
1answer
24 views

Node ID is not appearing

I am working on creating a view based on nid in Drupal 8. I cannot find node id or nid listed - I see Entity id. I am trying to set up a contextual filter so only certain node fields (node type B) ...
0
votes
1answer
30 views

Programmatically populate file field using Entity API

I need to programmatically generate nodes using some data that I extract from different import files. For the node creation I use Entity API. I've written a simple function to which I pass the node ...