Questions tagged [nodes]

The most basic form of content on a Drupal site is a node.

1,859 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
5
votes
1answer
329 views

Replacing tokens in Newsletter

I'm trying to create a custom template using the Drupal Newsletter module. I need to populate the newsletter with existing content. For this, I think I need to replace a token like [node:nid] in the ...
5
votes
1answer
186 views

Node reference solution for a content type which referenced to two fields. (company, product & review)

My website has three content types: company, product & review. 1). The product has a field referenced to a company node using Node URL Reference module. 2). The review has two fields, one ...
5
votes
3answers
1k views

How to set a mini panel to display node fields?

I want to load node fields into a mini panel, but when I do what I think that I need to do, the mini panel (= MP) is invisible (because the fields aren't displayed, I guess). So far I have: Added ...
4
votes
0answers
82 views

How to modify auto populate field value?

I m Stuck in two situation where I have to modify value of one field depending on another field selection. First situation is like I have two field Region (Node reference) - the widget type is ...
4
votes
2answers
1k views

How to programmatically add content to a group in the Group Module?

I'm using the Group module. If I have a group type such as Project, and I have a content type such as Article, and I programmatically created a new article node using Node::create(), how can I in the ...
4
votes
2answers
129 views

Make node a revision of another node

I have migrated content from a non-Drupal system to a fresh Drupal site. Some of the content nodes however should in fact be revisions of another node, not a unique node of themselves. Is there any ...
4
votes
3answers
3k views

Node add form alter & submit custom field

I have a content type "event" with a field called "field_pricelist". It's a dropdown with no values, I add the values when I alter the form. The values come from a custom table (install / schema) in ...
4
votes
2answers
408 views

How to Auto Publish nodes based on set interval?

I have nodes being generated from a Feeds import on a periodic basis, however when they are imported I would like them to be queued to be published on an hourly basis (or x minutes) I have looked at ...
4
votes
1answer
654 views

Unlimited field collection pagination in node edit page

In my node I have a field collection which is set to unlimited. How to enable pagination for node edit page, where all items from that field collection are displayed? For display there are couple ...
4
votes
2answers
154 views

View statistics with colorbox module

So I'm building a community website for a local photography group and I'm trying to set up a "well equiped" group photo grallery that registered members can upload photos to. The gallery should ...
4
votes
1answer
249 views

Solution for preventing indexing of content types?

I have a custom content type that I simply want to not be indexed by the Drupal search engine. Yes, I can hide it from the search results, but there are hundreds of thousands of these nodes and ...
4
votes
1answer
102 views

How to set up a question/assignment pool for a course website?

I have done quite a bit of Drupal work in the past, but am a bit stuck on this one. The basic idea is that the site will offer 1-on-1 tutoring to students. There will be there levels of users: ...
4
votes
1answer
979 views

Using Entity reference + Views to create members select list

How can I use VIEWS + ENTITY REFERENCE to get list of active members specific to the CURRENT GROUP [created via organic groups]. I have created a view that list active members belonging to the group....
3
votes
0answers
57 views

Can I enforce required fields when creating a node programmatically?

I'm experimenting with creating content. I made a method to create a piece of example content and redirect to its edit page. I didn't set some fields that I had defined as required on the content type....
3
votes
1answer
247 views

How to attach a paragraph to a node using node_updatehook?

I am trying to attach a paragraph, to a node. I am currently trying to do it in node_update hook. The value for paragraph will come a custom field. Currently am trying to achieve this with hard-...
3
votes
0answers
522 views

How do I use the current theme templates to render a node in a module in order to send node content via email?

I'm trying to send a rendered node (which contains multiple entity references) via email for a newsletter. I'm using workbench moderation and workbench email to manage the different states I need and ...
3
votes
4answers
2k views

How do I check if the form is an add/edit/delete form?

I need to check if the form is for creating, editing, or deleting a node. Currently, the below snippet allows me to check if the form is for adding or editing a node. How do I check if the form is ...
3
votes
0answers
44 views

Multilingual admin interface

I have a multilingual website ( english, dutch and german ). The language detection is setup to look at the URL for both interface and content. This results in an admin interface that goes from dutch ...
3
votes
1answer
137 views

How to create regular (monthly) reports from users?

There are several users with a customized role - Sales managers, who need to provide monthly reports on sales. A Content Type - Sales Report was configured in the system. The users will need to ...
3
votes
0answers
45 views

hook_node_load doesn't work when node is loaded by REST api

On the web, everything works fine (and I even checked the node values with krumo), when I tried fetching the json equivalent of the node using REST api, it's as if the hook_node_load() didn't run. If ...
3
votes
1answer
28 views

Custom template for displaying inner blog contents

I am trying to create a custom layout for my blog listing and blog content display pages. The following url will display all the latest blogs based on the conditions that I have set. http:///general-...
3
votes
1answer
174 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 ...
3
votes
0answers
83 views

Quick editing of taxonomy tags on a node

I am using Drupal 7 Advanced Forum. I have added a taxonomy field so that posts can be tagged with keywords (like in this forum). Currently if an editor responds to a customer post, the process for ...
3
votes
2answers
132 views

Do any comment modules play well with revisioning?

I'm faced with a situation where we need to keep track of which node revision a comment was made for, so that we can display whether the comment was made for a newer/older revision, or for the one ...
3
votes
1answer
363 views

How to pull pictures and summary information from external web pages when posting links?

When posting a link (external web page) to my Drupal blog, is there a way to have Drupal automatically pull the picture and summary information from that link and include it in the post on my Drupal ...
3
votes
0answers
211 views

Why are Active Forum Topics and New Forum Topics visible only to Administrator?

I have set up forums in Drupal 7 with the Forum Access module enabled and the Active Forum Topics block and the New Forum Topics block enabled on the home page. Everything works as it should except ...
3
votes
1answer
2k views

How to prevent a PDO exception when using Rules to Set a data value after saving new content?

I need to do a simple thing. Write a rule that edits some elements of the node, as soon as it is created. Unfortunately Drupal doesn’t like that and crashes whenever you try to save the node within a ...
3
votes
0answers
144 views

Drupal 6, Locale Module & Language Fallbacks

I have a Drupal 6 website, with 4 different locales, but only 2 different languages. The 4 locales are setup as follows: en, site.com, (American English) en-ca, site.ca, (Canadian English) fr, ...
3
votes
1answer
213 views

All content types displaying in “Show only items where” search

When I log in as a user who doesn't have access to certain content types, I can still see a list of those content types in admin/content under the "Show only items where" search. Also, some of the ...
3
votes
2answers
1k views

“This page was last modified on” code not displaying

I added the following code to my node.topl.php but nothing is displaying on my site. What am I missing? <?php if ($submitted) { echo 'This page was last modified on ' . date( "F j, Y",$node->...
3
votes
2answers
307 views

How to Create content type per organic group

Hi i have created a content type and i have 4 groups using organic groups. Is there any way i can restrict content type to one of the organic group.so other groups cant create any content with the ...
3
votes
4answers
63 views

Is there a way to insert a view in a node form?

I have created a content-type based form (contact form) for anonymous users. One of the fields in the form must displays a view. This view is a slideshow view that displays different persons (site ...
3
votes
1answer
674 views

Using token in page.tpl.php?

I downloaded the social media module and I found this token: [socialmedia:sm-twitter_username]. I want to show it where the Read more / Add new comment section is, under an article. Since I can't find ...
3
votes
1answer
771 views

bulk node translation

We have a lot of languages on the site and a node needs to be translated in every one of them. We create the node in English and then some people translate the content to their language. So when there ...
3
votes
0answers
332 views

D7 | views filter to show current user nodes or all nodes if admin

I have a site with multiple roles: admin editor1 editor2 editor3 … I would like to be able to show a node reference drop down menu to only show current users's nodes. So each user can only node-ref ...
3
votes
2answers
119 views

Change the value of a piece of content using a comment

I have a content type which I don't want a user to be able to edit once it has been created. but I want them to be able to change 1 value and the way I want them to do that is through a selection box ...
3
votes
1answer
348 views

Getting book pages in same level like getting child pages

I have a book called courses with several subpages, I want to show the list of ot other subpages when one subpage is open. Example: -Courses ---Course1 ---Course2 ---Course3 ---course4 I want to ...
2
votes
0answers
64 views

Webform module loosing language for referenced options

First I have content type "Quiz option" which is translatable. Then I have a view that returns Entity references of that type. For language option I selected "Content language of view row" and also ...
2
votes
0answers
47 views

EntityQuery with node_access module compatibly

I have installed node_access for maintaining access per node. I need to write a sql query using entityQuery service and display only those nodes which respect node_access configuration per node. I am ...
2
votes
0answers
277 views

How do I programmatically change the node default language?

I have a node already translated in 3 languages (en, fr, es) with en being the default language. and I want to change it to fr. I looked around and I found setDefaultLangcode() (protected). Is there ...
2
votes
0answers
102 views

Working with hook_node_access_grants

I am currently working with Permission by Term to set simple access control on two node types with terms. As noted here, I believe I found a bug where the access record isn't written the first time ...
2
votes
0answers
291 views

CKEditor Internal links are not prefixed with language

I have a multilingual Drupal site and I noticed that the paths of relative links added by CKEditor ignore the current language prefix and redirect to that node pages with default language (ie. /cn/...
2
votes
1answer
296 views

How to bypass required fields if Saving node as unpublished in drupal 8?

I am saving node as unpublished without adding data in required fields. How can I achieve that in Drupal 8 ? Basically I need something like Save as Draft option for nodes in content types.
2
votes
1answer
209 views

Pseudo field show/hide setting per node

I have created a pseudo field using hook_entity_extra_field_info() and displaying markup using hook_entity_view(). How can I create a checkbox setting in node create form so that I can show / hide ...
2
votes
1answer
94 views

Complex sorting Views

Our Drupal 7 site has a feed of events which are parsed into nodes. Not every event is equally relevant, and they would like a way to selecrt the top five events, sorted chronologically, to appear on ...
2
votes
1answer
288 views

Is there a way to add node grants to anonymous users?

I want anonymous users to be able to access nodes that are promoted to the frontpage (they can't access to nodes that are not promoted) and hook_node_access does not seems to be called for anonymous ...
2
votes
1answer
44 views

View or module that shows which nodes are linking to the current node?

Has anyone found a way to show which pages (nodes) have internal links to another page (node)? This could be a view that shows a listing for each node of a particular content type and then all the ...
2
votes
0answers
50 views

print node click count using link click count module

I'm using 'link click count' module and I want to print and sort the view content based on click count.Is there is possibility to print click count or add the sort criteria for click count instead of ...
2
votes
1answer
79 views

Delete node: Remove header, footer and rightbar in delete node page

I want to remove the header, footer and rightbar in a delete node page (node/.../delete). How can this be reached? I already tried editing page--node--delete.tpl.php, but this does not work.
2
votes
1answer
38 views

“Changed by” column for node list

If a node is changed by another user, the change time is shown on /admin/content but not by which user the node was changed. I couldn't find any field in the respective view to add. Did I miss sth?