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)

4
votes
2answers
709 views

How to get exact value of a field from database?

I want to get value of a field, but I need the value that is saved in database, not the value that may be changed by hook_node_load. Is there a way to do this? If there is no function for this ...
4
votes
3answers
4k views

How to create nodes using node_save?

I'm trying to migrate my current html site into drupal. I have over 80,000 pages I have to migrate so I thought instead of sitting infront of a computer for 50 years I would create a module. I was ...
4
votes
2answers
387 views

Remove “submitted by” text on teaser only

I read on How do I remove the "submitted by" text on node display? where you can remove this in the content type settings for the node itself, but is there a way to only change the teaser so ...
4
votes
2answers
1k views

How do I remove the revision information from a node edit form?

I'm hoping someone can help a Drupal beginner removing a view from my page. The purpose of it is a for data collection. This is the section I am trying to remove:
4
votes
1answer
834 views

Programmatically add more than one taxonomy term in Drupal 7

Just a quick question. I'm creating a node and adding a term to the node like this: $newNode->field_tags[$newNode->language][]['tid'] = "a digit here"; Fine, but how do I add more than one ...
4
votes
2answers
119 views

Restore backup solution for busy sites

Today one of my users went and deleted the root of an Organic Group and wiped out all of the child nodes from that group and it's associated menu entries. I have a backup, so I can restore, but in ...
4
votes
2answers
439 views

Allow a node to have many dates attached to it

I am stumped trying to figure out how to set up a node to have many dates attached to it without having to just add a lot of date fields to it. The scenario is that we have a show, and that show ...
4
votes
3answers
932 views

Theming the node edit forms to open them within Lightbox

I'm trying to display all the node edit forms neatly within Lightbox, without any of the excess content I don't want: no sidebars, footer, header, nothing but just the content. So I created a ...
4
votes
1answer
221 views

Programmatically create node using feeds

I'm creating nodes from XML using the Feeds module (great module BTW). function boardgamegeek_menu() { $items['games/add/%/%'] = array( 'title' => 'Boardgamegeek add game', 'description' ...
4
votes
2answers
123 views

How to display nodes only after certain dates? (An Advent calendar is in progress)

I'd like to build an Advent calendar with Drupal 7 as a warm-up exercise. What would be the recommended way to protect future calendar entries from being accessed before their time? I have 3–5 ...
4
votes
2answers
192 views

How do I export a site without it's Node data?

I have a site with very high volumes of data (1000+ nodes per day * 3+ years and growing each day). When we need to create a development snapshot of this database it takes FOREVER to import it. I ...
4
votes
3answers
893 views

How do I hide the content of nodes/ completely, and still maintain use within Drupal 7?

So, to start off, I've seen: How do I hide Drupal nodes that shouldn't be directly accessed from users and search engines? How to prevent access to Views-only content? How can I restrict view ...
4
votes
1answer
554 views

Override theme_node_preview

I'm using a custom theme but Seven as administration theme. How can I override the theme function 'theme_node_preview'? Notice that theme_node_preview is called in the node form, and it's shown in ...
4
votes
2answers
3k views

Accessing $language inside node content in drupal 7

Normally I would use $language to get the active language on my drupal 7 page. Now I'm doing some changes to a node content (set to PHP code) and I can't seem to get any variables working? I badly ...
4
votes
1answer
337 views

How to make node delete confirmation inline?

I need to know how to override the normal delete node confirmation (preferably for a specific content type). My site has one content type that users are able to delete and right now it forward them to ...
4
votes
1answer
170 views

Output the field as $<field_name>_rendered in the node page

When a CCK field is added, we get the rendered output in the node page as $<field_name>_rendered. How can we get a variable in the same way when we alter the form and add new field?
4
votes
1answer
180 views

Webform - Replace Form title with Node title

I'm working on a Job Portal where-in i created a content-type for job listing and a Job Application Webform. I need to provide a link on the job node which will be linked to the webform and upon ...
4
votes
3answers
290 views

button for boolean field during node display

I have a boolean field in my content type which takes values either 1 or 0. I want to provide a button instead of just displaying the value of field so that the user can click on it and toggle the ...
4
votes
2answers
344 views

One node for every referenced node in views

I have a view that uses the table display mode. I want to show up the last created node for every referenced node; for example, I have two users, and I want to show the last post for both users. ...
4
votes
4answers
216 views

Allow node creation only via services

Is there a way to allow the creation of nodes only via services and not via node/add? I want that nodes are created by the users of a mobile application, and not using the web interface. Is this ...
4
votes
1answer
743 views

How to convert image URLs in Drupal node's fields while rendering?

I have developed a new CCK module using Plupload where users can drag and upload images using native HTML5 apis. Since, I do not know how to drag images directly inside CKEditor, what I am doing is ...
3
votes
3answers
340 views

How to add 1000 nodes of the same content type in just one step?

I need some advice with the following situation: I have a content type called: "Flats". I have to add 1000 nodes for this content type. The only field I need to complete for all of them is the ...
3
votes
3answers
119 views

How can I make or render a website with wiki features(for e.g wikipedia) with Drupal?

The question is can I render wiki features in my website which is to be made with Drupal.For e.g if I make a website with tons of features how can Wiki feature be made functional with Drupal.If no ...
3
votes
3answers
2k views

Module to rearrange node order

Can anyone direct me to a module which can allow me to rearrange the order the nodes come out? I made an FAQ content type and I'm looking for a way to reorder them on the page in any order I want. I ...
3
votes
6answers
4k views

How to redirect toward a specific node from front-page in Drupal 7?

I have a multi language site made in Drupal 7. And I want to check if I am on the front page then if true to redirect the user to a to some specific node. I have tried different methods: to ...
3
votes
2answers
1k views

How can I add a “weight” functionality to nodes?

I would like to be able to specify a "weight" for the article nodes published in the homepage. What is the best way to do this?
3
votes
1answer
2k views

How can I embed a “node add” form in a page?

I'm looking for a way to embed a "node add" form on a landing page. I was using Form Block, but it appears to bring many error because I was using a development snapshot version.
3
votes
1answer
4k views

How do I get a list of all taxonomy terms assigned to a node?

I have a node and want to get all the taxonomy terms assigned to the node. In drupal 6 I could use $node->taxonomy and the taxonomy_* functions but these don't exist in drupal 7.
3
votes
3answers
3k views

How to add additional display(view mode) for node?

I am using drupal7. I am creating custom article content type. Standart node type supports only two view modes teaser and full view modes. function mymodule_view($node, $view_mode) { if ...
3
votes
3answers
135 views

Force nodes created by Feeds module to be published even if nodes are unpublished by default

How can I do this? Force nodes created by Feeds module to be published even if regular nodes are unpublished by default.
3
votes
3answers
1k views

Limiting Node Creation in Drupal 7

I'm looking to limit the number of nodes that a user can create in Drupal 7. Which hook should I implement to step in before the 'add node' page is shown?
3
votes
3answers
2k views

Creating node forms

Does anyone know how to create a node form for specific Content Types? Instead of clicking Content > Add Content > Content Type they can just, I don't know, go to the sidebar and fill out the info ...
3
votes
3answers
456 views

Does it make sense to develop a fantasy sports management system by creating or extending entities?

I am considering building a fantasy sports management system with Drupal. The system will need content, so that's taken care of with the standard Drupal system. However, does it make sense (or even ...
3
votes
4answers
106 views

“Authored by” field to be automatically filled

On every creation of a node or edit of a node I need the "Authored by" field to be automatically populated with the username of anyone saving changes. any ideas how I can do that? Thanks.
3
votes
3answers
1k views

“Add content” button on related content node?

Let's say I have 2 content types "Shopping center" and "Shop". "Shopping center" is a OG group. "Shop" has node reference field "Shopping center". I would like to allow moderators to add shops to ...
3
votes
2answers
3k views

How can I return actual JSON using Drupal?

I'd like to implement a simple AJAX function locally that allows me to autocomplete node titles of already existing nodes as the user types. To that end, I need the ability to have an API that I can ...
3
votes
1answer
156 views

How can I allow users to add a reason for a flag?

I have the Flag module installed on my Drupal 7.8 site, but I can't figure out how to allow users to submit a reason for a flag along with the flag. I've tried looking this up, but the only thing I ...
3
votes
5answers
1k views

how to display cck node fields' values at search result page

I need to display some specific cck fields such as Telephone Number, Address, etc. at search result page. As I see the search-result.tpl.php, there is no $node->... So how can I get the node ...
3
votes
2answers
1k views

Loading nodes from a specific user and a specific node type

I have written this function to do so, but it behave strangly, i am wondering if i have the correct approach function getNodes($type,$userID){ $where = array(); $nodes = array(); ...
3
votes
3answers
1k views

Exposing fields for a search in Views

I can add a filter for node:title and node:body, but then there's two separate search fields for the content. I also have some other exposed filters (checkboxes), but I need rather than two search ...
3
votes
1answer
352 views

How to order a node's taxonomy terms hierarchically?

Are the terms in a node's taxonomy array ordered hierarchically by default? If not, what is the most efficient way to do so?
3
votes
1answer
64 views

Mention/Reply to users in comments using @ (@name)

I am looking for a feature that makes it possible to reply to comments, or mention users in a comment using the @ symbol. So, if I was to write the following in a comment on a node: @Michael ...
3
votes
1answer
79 views

Private data in node format

The Overall Plan I'm creating a staff "portal" area for a non-profit. In the future I want to migrate the current static front-end website to Drupal, so I thought it would make sense to develop this ...
3
votes
1answer
260 views

Where to place PHP code for a node if not in the node body block itself?

Up until now, I have found it most convenient and easy to place PHP code into my node by placing it in the node body and enabling the PHP filter. However, I have been informed that this is incorrect ...
3
votes
2answers
2k views

How do I programmatically create a simple 'page' node?

I have already found Drupal 6 documentation on how to programmatically create a page node. How is it possible to achieve that in Drupal 7? I've changed my strategy, and I'm using another approach, ...
3
votes
3answers
88 views

fast saving single field value

I've got around 70k nodes of specified type on my site. I need to run an update on them. Some operations and setting one field to desired value. node_save is really slow and it causes crashes (too ...
3
votes
1answer
77 views

Creating nodes and sub-nodes from database table

For example I have a database table defined from the following SQL. CREATE TABLE IF NOT EXISTS `mytable` ( `id` int(11) NOT NULL AUTO_INCREMENT, `base_id` int(11) NOT NULL, `page_type` ...
3
votes
1answer
425 views

Including multiple authors in Authoring information for a Drupal 7 node

I have a CMS to which many people can possibly provide data. So, I would want to include all the users who have contributed the data for a node by adding new data or moderating existing data, because ...
3
votes
2answers
561 views

Get node values from array with Drupal API?

With Drupal API I found you can get the values of a node with noad_load like so: $thisnode = node_load($nid = $child2, $vid = NULL, $reset = FALSE); Now it is easy to echo the title in this way ...
3
votes
1answer
416 views

Adding a clearfix class to hook_node_view

Ok, so what I want to do is to add a class of clearfix whenever Drupal outputs a node view with inline links. I've been looking around and I figured hook_node_view() is what I need to alter. Looking ...

1 2 3 4 5 25