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

learn more… | top users | synonyms (1)

0
votes
0answers
4 views

Add new field to node form on validate

I am performing a hook_node_validate() and would like to add a new field (e.g. a textfield) during the processing of this function. Is this possible? If so could someone let me know how to do it. I ...
0
votes
0answers
6 views

Notice: Use of undefined constant value - assumed 'value' [on hold]

Following php code give Notice "Use of undefined constant value - assumed 'value' in eval()". echo '<div class="row row_havan"><span class="target_title"><h3>Havan : ...
0
votes
1answer
21 views

Echo content from a node field using ajax [on hold]

I have a node that has a link field named title_url, that consist of title and the url is some node id. Using views I extract those fields in a page. I want that when I click on one of extracted ...
1
vote
1answer
17 views

How to save multi date and time in node programmatically?

I want to save multi Date value in a node programmatically. $node->field_event_date['und'][0]['value'] =?; $node->field_event_date['und'][0]['value2'] =?; getting the below value after print ...
0
votes
0answers
10 views

Edit Node Links in Node Template (Page Manager)

I have created a variant for my Group and customized the layout. One of the elements I added to my content is "Node Links". Is it possible to edit the links? Currently there are two links but I want ...
0
votes
0answers
8 views

How the path module handle path [duplicate]

I have two path one is "book/content/9(book_id)" render a View page and another is "book/content/book_alias" (autopath) Now view get a argument 9 and display a View Page but when ...
0
votes
0answers
11 views

How to add additional custom publish option in Drupal 6? [on hold]

I need to add an additional option while publishing a node, like "View on feed list." I know there are modules available for both Drupal 6 and 7 but I don't want to use them.
2
votes
2answers
24 views

How to combine content from two different environments?

We have two Drupal environments: dev and prod. We use dev to stage content before it goes to production. We also have prod, where content is created and then have to manually re-create those changes ...
0
votes
1answer
26 views

Create “suggest an edit” functionality for anonymous users on nodes

I'd like to provide a way for anonymous users to submit nodes, but also provide suggested edits to existing nodes. The core node revision system cannot support this. How would one implement a ...
0
votes
2answers
25 views

Updating node field value using custom module validation

I currently have a custom module which calls a submit custom validation function. I am trying to update a value after the validation is run. Basically, if a value is present, update a field to say ...
2
votes
0answers
23 views

How can i override all node book/book_alias usng alias

How can i override all node "book/book_alias" using View when i tried "contextual filter" not provided for alias i must use a node id rather then book_alias. Any Solution to override a multiple node ...
0
votes
0answers
10 views

print description title tag in flex slider

I want to print image field title inside the <img>. eg. <img draggable="false" class="flex-img img-responsive" title="[description-title]" ...
0
votes
1answer
15 views

node preview button not working

The issue I am having is that when I try to preview the content of a node I have created by clicking the 'Preview' button the page just refreshes and the preview. What I have tried Looking into ...
0
votes
1answer
18 views

How to set Time Limit on Comment Edit [duplicate]

I need to set time limit to edit comment, like Stack Overflow strategy that sets 5 minutes time limit. The Time Limit on Comment Edit asked the same question and the Edit Limit was proposed. In ...
0
votes
0answers
5 views

Create multiple nodes through one mail using mailhandler?

I want to create more than one node, from one email sent to the drupal site, using the mailhandler module. Is that possible?
0
votes
1answer
26 views

Configure Menu Access Visibility and permission

I have a question for Menu Visibility. I have an entire live site in production. I am trying to build editorial workflow for my editors, other editors and approvers. I am using Workbench Access and ...
1
vote
0answers
22 views

How to add value to a field in a node through code? [duplicate]

I have a field that I need a value assigned to, I want this field to be populated with a particular value when the node is being saved. Where should the code be placed? And how would I go about ...
0
votes
1answer
31 views

How can you remove the edit lock on a node?

When I try to save a node I am working on I get this error message The content on this page has either been modified by another user, or you have already submitted modifications using this form. As a ...
0
votes
0answers
10 views

How i can add folder in filedepot using a custom module (without rules)

I want to create a module that adds a FileDepot folder, in this module I want the user chooses a name for the folder and I want the Parent Folder will by default "Top Level Root", I began to create ...
-1
votes
0answers
21 views

Update Url_alias for missing node record [closed]

Node table has been cleaned up and no more Old style url content exist in the node table. Old style url == article/billclinton/ new style url == article/billclinton/guid(1234567890) When end user, ...
0
votes
1answer
25 views

Add JavaScript to a page without access to core files?

I apologize in advance if this is a really simple question, but I'm pretty new to Drupal and still figuring out my way around things. So I was wondering if it is possible to add JS to a certain node ...
1
vote
2answers
21 views

share users or nodes across multiple sites without sharing database

I have one master drupal site that offers basic functionality for users.(it's a shop); and we have some other sites, for example one news site, one marketplace, one job finding service etc. I want ...
0
votes
0answers
33 views

How to list out taxonomy list at front end.? [duplicate]

I want to display taxonomy list at front side using Drupal 7. i have list of Courses like C1,C2,C3 that i have to show it for user to select specific Course. As i am new in Drupal so I dont know ...
0
votes
1answer
20 views

How is comment widget controlled

In the core within the comment module a widget is provided by CommentWidget.php file (namespaceDrupal\comment\Plugin\Field\FieldWidget;). In this widget comment settings like open, close, hidden is ...
-2
votes
2answers
39 views

How i can change page with “next” previous" buttons in the same node

i want create something like that : and after clicking next page , the node doesn't change :
0
votes
0answers
33 views

Cannot get the real author of a node through node_load() in drupal 7

this is a weird one... I have been using node_load('NID') for a few months now in my custom modules and it has always worked all right. The past two days however, something strange is going on. When I ...
1
vote
1answer
18 views

Let user pick background Image/Color on node form

I would like to allow my users to choose a background image or color for a node. I created a content type with two fields: 'background image' of type image, and 'background color' of type color field. ...
1
vote
1answer
32 views

Clear cache of node

I am implementing hook_entity_view() in my module. In the hook I am adding a link to the node by rendering a array. The links need to be added only when a certain configuration condition becomes TRUE. ...
0
votes
0answers
10 views

using rules module : how i can adding page with the name of text field form when i click in the button

I want to automatically create a page had like name the one that I put in the fields: title of the node, here is the image: the steps that I want: 1 . enter a name of the node (example: Name of ...
0
votes
1answer
10 views

Pathauto URL alias Node taxonomy term translation

How can i get pathalias to get the translated taxonomy term for the path alias? The pattern: [node:field_glp_product_types]-[node:field_glp_address:city:?] [node:field_glp_product_types] is a ...
0
votes
1answer
29 views

How to email the webform content to current page author email “Token [current-page:node:author:mail] is not working any more”

I have a content type topic, and a Webfrom "contact" as block which is available for topic content type only. Any registered user can create topic, and I want to use the Webfrom to contact the topic ...
0
votes
0answers
6 views

How to use file_prepare_directory and make the file writable

I am writing some code which imports nodes programmatically. Part of this code involves importing files, which would then be turned into file entities and attached to files. I am having a permissions ...
0
votes
2answers
14 views

Node Teaser template in custom module

I have used given below code for node--[content_type].tpl.php (default) template file function MYMODULE_theme($existing, $type, $theme, $path) { return array( 'node__NODETYPE' => array( ...
3
votes
1answer
67 views

Creating field on each node

I want to add a field on each node which links to a particular page where module's controller will act. I want to actually add a link at bottom of node, and I want to do this programmatically. But I ...
0
votes
1answer
25 views

How to add PHP to a node without php filter?

I have a one-off page on my site (webcam), where i need to run some php to eg. calculate today's sunrise time, add a daylight image at night, etc. I understand PHP Filter is a security risk, and not ...
0
votes
1answer
28 views

entity_load based on language selection

I have a node for different language, but I would like to load node for "en" language only using entity_load after firing entity query. How can I achieve it using this function in Drupal 7
0
votes
0answers
7 views

views module: hide node title in combined view

I've used the views module to output two nodes together on the same page, both of a different content type. I have accomplished that by filtering by the two node IDs and putting those filters in an OR ...
0
votes
1answer
8 views

How can I schedule in advance an update to a node, to occur at a given time?

In a situation where I know that a specific change to the content of a specific node will need to be made on a specific date and time, is there any way to automate that change so that I do not need to ...
0
votes
1answer
17 views

Uploaded image accessible by many nodes

Is it possible to upload an image to Drupal which is accessible by all nodes programmatically? What I want to do is upload an image which will then display as a banner (CSS background) for nodes that ...
0
votes
0answers
33 views

Unpublish node created upon checkout

Looking to tie a recurring product to the published status of the node it created. I've tried this by creating a node on checkout in a number of ways, but my most recent and promising attempt ...
0
votes
1answer
21 views

Add preprocess to content within body field

I need to be able to wrap an anchor tag with rel="shadowbox" and href with the path to the image on all img tags that are inserted into the body field of a node. I think I can somehow do this with ...
0
votes
1answer
12 views

Is there a module that saves the node while you are creating it?

I have a blog, I write blogposts everyday. Today I was creating a blog post, I was almost finished, but for some reason my computer turned off. I lost all that I had in my article I have to write it ...
0
votes
0answers
17 views

Content loss in Drupal related with field_attach_update

Drupal field_attach_update seems to be the cause of a content loss in my application. This function is used to save a node field instead of the whole node but if it is not used properly it can ...
0
votes
1answer
12 views

Query a list of field values of a node in drupal 7

I am new to drupal 7, I have a question and hope to receive your helpful responses! :D I've created a new content type named 'school', and create a custom 'city' field in it. After that, I create two ...
0
votes
1answer
12 views

How to find the count of items in a block?

I have a block named views-view-fields--our-services--block.tpl.php i need to find the no of nodes under this block.How do find the total no of nodes displaying inside a block?
2
votes
1answer
22 views

How to add a custom block on Print module?

I'm using the Print module. I wonder if there is a way to print a custom block on the print.tpl.php. Because I want to print a node but that node has its own custom blocks that is rendered on its ...
2
votes
3answers
56 views

Change logged-in user permission in hook_node_view

Can anyone please let me know how can we achieve the following scenario I want to change the role of the logged-in user before viewing the node. When you click on the node for viewing it, I want the ...
0
votes
3answers
35 views

node--content-type.tpl.php did not override

and now i stuck in using node override with content type. I followed these step. Create new content type name post (machine name: post) Copy node.tpl.php from module to ...
1
vote
1answer
26 views

How to move node contents from local to server environments?

What is the best way to move node contents from a local environment to a server environment? I don't want to go with the Features modules. Any examples that we can go with dbscripts?
0
votes
1answer
17 views

Mark deletion on custom fields

I am using mongodb as the backend for the node_save functionality and I have migrated my custom fields. So for every node save it calls the hook_field_storage_write() . Thus the data is saved in the ...