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)

2
votes
1answer
166 views

How to update taxonomy field in a node?

node_load($nid); $node->mytaxonomyfield['und'][0]['tid']=$data; node_save($nid) my corresponding terms : online,offline,pre-online and the corresponding tid : 1,2,3 my question : what the ...
2
votes
1answer
288 views

Correct way of upgrading Drupal 6 to Drupal 7 with huge data

I have a Drupal 6 site that contains hundred of thousands of node and bunch of custom and contributed modules. My problem now is how can I upgrade this correctly in Drupal 7. I tried to steps ...
2
votes
1answer
729 views

How to limit users to a create only one instance of a node type in Drupal 7?

I know there is Node Limit module, but since it is in alpha stage since a rather long time, I am wondering if there is more elegant way to do so which does not need additional modules?
2
votes
3answers
580 views

Overlay zoomed image in node?

How can I implement a zoom functionality on my content nodes? Like I need to put a zoom button next to my image and clicking it brings a floating zoomed image over the page like it's done here. I'm ...
2
votes
2answers
1k views

Adding AJAX to existing node form

Creation of new content type by D7 core is intuitive, fast and nice looking. We don't have to worry about db tables and simple validation. We have widgets, displays, etc. And actually we are building ...
2
votes
1answer
83 views

How do I set permission for a custom page to be based on node access?

I have added pages using hook_menu like so: function dynamic_entries_menu() { $items = array(); $items['entries/get'] = array( 'title' => 'Dynamic Entries', 'page ...
2
votes
1answer
2k views

Difference Between render($content['body']) and print $body[0]['value']; in node.tpl.php

What is the difference between render($content['body']); and print $body[0]['value']; in node.tpl.php? render($content['body']); seems to include all the fields while print $body[0]['value']; ...
2
votes
3answers
1k views

Drupal 7, displaying an image to search results

I have a content type called "people". When a search is made and one of the search results is of "people" type, I want to display two fields of the "people" type; an image called "photo", and a text ...
2
votes
2answers
118 views

How do I set “has_title = false” for an existing node?

I understand how to set the node attribute 'has title' via the hook_node_info() when creating a node programmatically. However, I struggle to edit this attribute for a node that has been created with ...
2
votes
1answer
251 views

Adding metadata to a node through a module

I am developing a module that sync selected nodes with an outside site (another API on the web). I need to add some meta-data to each node: Last sync time (timestamp) - Not editable through UI ...
2
votes
2answers
402 views

Administrator's approval required after published node has been edited

After editing, any published node needs administrator's approval like comments. How can I do this with Drupal 6?
2
votes
1answer
202 views

Term name of current node in title

I'm trying to echo out the current term name that my node is inside of into my function, but it only keeps echoing out 1 and not the name. This is what I have. function ...
2
votes
2answers
67 views

is there a way to make template for set of nodes?

Is it possible to make a template for set of nodes in Drupal 7 for example page--node--[601-602-603-604].tpl and if so what is it?
2
votes
1answer
566 views

User ID problem when programmatically creating nodes

I have written a migration script that migrates data from Drupal 4.7 to Drupal 6. It is highly customized for my purposes. I am able to create new nodes with no problem. However, after I save the ...
2
votes
1answer
706 views

How to validate node field for minimum length for a custom content type?

I notice body has some preselectable minimum lengths. How do I do this for text fields? Also, how do I set a custom minimum length for node body of a content type?
2
votes
2answers
388 views

how do i create a new link in node.tpl.php by preprocess function in drupal?

I have content type in which I have two or three links .In node.tpl.php, all links are displaying from a single variable "$links" in node.tpl.php. i want to remove one particular link from the ...
2
votes
1answer
170 views

Change content types

Is it possible to change node content types? I have a bunch of story nodes and I would like to create several content types and reassign each story to a different content type. Is there a way to ...
2
votes
3answers
437 views

Block that shows nodes based on node type

I want to create a module that displays nodes of a certain node type. Can this be done, and can anyone point me to a place where I can find how to do this?
2
votes
1answer
29 views

Do I need to build a custom page to list nodes by content type?

Environment Mac OSX 10.8.2 MAMP Drupal 7 (just downloaded the stable today) Objective Create a menu item in the main menu to list recent and all nodes of a specific content type. Question It ...
2
votes
1answer
25 views

How to display “About the author” tab in article display page?

I want to basically override the normal display of article, to include two tabs in that. One tab will be "Read Article", which when clicks loads the article page. Others tab will be "About the ...
2
votes
1answer
76 views

Syntax to display only the node body using node embed module

Would appreciate it if someone could let me know what the syntax is to display only the node body within another node. I tried something like this: [[nid:1234 body]] Obviously, that is not ...
2
votes
2answers
175 views

I save form data using hook_form_alter() but the data don't appear when editing the node from the UI

I implemented hook_form_alter() to insert few fields. I implemented hook_node_insert() to save the field data, hook_node_load(), and hook_node_view(). Everything works fine, but when I edit the node, ...
2
votes
3answers
207 views

Restricting access to nodes

I am new to Drupal and for some time now I am trying to figure out how to control access to nodes. After figuring out that no module will give me what I want and deciding that I will have to get my ...
2
votes
5answers
157 views

How to have a three column in node page

I want to have a three column in node page, my page width is 940px, and one column is 300px + 20px right margin, so 3 column is 960px, but the main width is 940px, I want to 3 column in one row, how ...
2
votes
1answer
61 views

How to check node table for entry by current date before inserting new node?

How can I check the database table for specific node entries by date before inserting a new node? I want to check the node table for any node with the current date, if found, I want to delete the ...
2
votes
1answer
107 views

display only one comment in node page

I'd like to display only 1 comment (the most recent one) in node page. And I don't want the pager to be displayed too. Is there any way to do it without writing custom module? Could I use ...
2
votes
1answer
306 views

Correct way to add a tweet button?

I'm trying to add a tweet button to my node.tpl.php in Drupal 6 - https://dev.twitter.com/docs/tweet-button. I literally place the html+javascript within node.tpl like so: <a ...
2
votes
1answer
285 views

Use node_save with a custom nid

On our system (D5) two nodes have been deleted (by mistake). I need them back but I can't simply load a backup as there's a lot of new content created. I want to create these two new nodes again, ...
2
votes
1answer
367 views

How to render a node image separately from the rest of the node content

I want to know the variable name for the image which renders with content; being more specific when I render my content with the following code: <?php print render($content); ?> It renders ...
2
votes
3answers
434 views

Taxonomy inline with several category types?

Is it possible for D7 to display several taxonomy fields inline with some separator between them? I want to have a node with 2 category types, say, a song with a Year and a Singer. Now the taxonomy ...
2
votes
1answer
436 views

What drupal function do I use to rename files when saving nodes programatically?

Normally when saving a node with the content type form, uploading a file will automatically rename it if the file name is already in the database. I am creating nodes programatically. Everything ...
2
votes
1answer
1k views

Populating a node reference field using PHP in Rules

I have a rule which is triggered when a node is flagged. Currently, the rule loads some content (1) that has been referenced by a field on the flagged content. I have set the rule to create a new ...
2
votes
3answers
415 views

How to find bad PHP node that makes search_cron fail?

I can't run cron, manually or automatically. I installed Cron Debug module, checked all modules, and found out that the Search module makes cron stuck. When I disable it, cron is working. I suppose ...
2
votes
1answer
453 views

Why do I get pathauto errors when using node_save?

When I'm programatically creating nodes using the code found here I keep getting the following errors: Warning: Illegal offset type in isset or empty in pathauto_cleanstring() (line 180 of ...
2
votes
1answer
228 views

Need a hook a little later then hook_node_insert

I am working on a module to unzip the contents of my file field after I have submitted the node. I originally tried to do this in hook_node_insert but this did not work for me because my file field ...
2
votes
1answer
210 views

Can nodes created using Feeds be updated automatically?

The Feeds documentation mentions that it's possible to import a CSV feed and create nodes from it, assigning column values as CCK fields, but it doesn't mention if it's possible to update nodes when ...
2
votes
1answer
36 views

Plain Unstrucutred HTML Content Types, How to Pull image from them in Views

This is a plain unstructured node with no CCK structure or anything like that (the site includes thousands of posts so it is impossible to retroactively go back and re-insert the images in using CCK). ...
2
votes
1answer
176 views

Does node_save create all fields associated with a custom content type automatically?

I have a custom content type and want to create new nodes in code. The content type contains fields, some will be set with values and others left empty. Is it necessary to define all the fields ...
2
votes
1answer
372 views

How to display add node form below the view in Drupal 6?

I have a very similar functionality to stackoverflow - i.e. I have a a view that display question and below it there are answers (seperate nodes references). The user can comment on both the question ...
2
votes
1answer
185 views

How can I schedule change of the default front page?

I have a node being displayed on the front page, set at admin/config/system/site-information > Frontpage. I need to change it to another node on specific date. It would be ideal if I could do that ...
2
votes
2answers
405 views

Pre-Populating a CCK Flexifield/Multigroup?

I'm using a repeating fieldset module (Flexifield, somewhat similar to CCK3 Multigroup) to create a measurement sheet content type. In this, the user is allowed to create an unlimited number of rooms, ...
2
votes
1answer
101 views

Drupal 6 as a call logging system - question about node performance & scalability

We currently use Drupal as a Knowledge, communications and assessments system for our call centre agents and it is working great. However there has been a request that this to also handle our call ...
2
votes
1answer
51 views

Give users a stripped down version of add node page and then require admin approval

I want to give my users stripped down versions of the 'add node' pages to create nodes of various content types. Once they fill out the stripped down version (less fields and options) an admin/editor ...
2
votes
1answer
3k views

Using preprocess node variable in page.tpl.php

I've set up a couple of variables in my template_preprocess_node(). How can I access them within a page template? I can access the $node variable, but it doesn't seem to have been preprocessed. How ...
2
votes
3answers
796 views

Getting the value of a user reference field and using it to display information about that user

I am quite new to module development although I have experience in modifying existing 6.x block modules developed by others. I have a need to develop a 7.x module and in spite of a lot of ...
2
votes
3answers
623 views

Display current node rank from votes (voting api) in view

As in Title. I am struggling by programming but with no luck. Mechanism of voting api is too complicated for me. How can I display current node rank (order number) by votes? My view now: Sort ...
2
votes
1answer
81 views

Recover the field from one Drupal page to another

What I want to do is recovering the avatar picture the Avatar Selection module generates, and present it elsewhere in my Drupal installation, specifically in pages where it is not appearing. I have ...
2
votes
2answers
119 views

How to make content of a (cck) field visible when pressing a button?

I am working on a Drupal 7 website and I would like to create a node where a specific (cck) text field is only shown to the users after they press a button. The effect I would like to achieve is ...
2
votes
2answers
258 views

Copy view mode custom settings

On /admin/structure/types/manage/article/display I can enable custom display settings for various view modes. But what if I want one custom view mode to be almost identical to another? Is there a way ...
2
votes
2answers
370 views

Multiple Teasers

My goal is to have three views of a teaser. Why different teasers? I have a blog and I'm displaying teasers of the blog entries in different ways because my pages have different layouts for the ...

1 3 4 5 6 7 25