Questions tagged [nodes]

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

Filter by
Sorted by
Tagged with
0
votes
1answer
252 views

Custom node color from role

How to create custom node background color from role id e.g. admin - red manager -green auth user - blue, automatically? Find examples (template.php) function themename_preprocess_node($variables) { ...
0
votes
2answers
364 views

give node author ability to position the image when uploading content

I have a field of type image "COVER IMAGE" in my blog entry content type. The users should have the power to place it wherever they like...top, down,right or left, if not more and re size it. right ...
0
votes
1answer
251 views

How to skip client side validation for draft node?

I am using clientside validation module for drupal 7.I have two button for submit node one is for save as draft and other submit so Now my scenario is that if i click on save as draft then it should ...
0
votes
1answer
282 views

Sending a message to users of a flagged node when it is referenced

I have a site where a user can watch a node using the Flag module. Users can also reference the node and I wanted to set up a rule that when the node is referenced, a message is sent to all the ...
0
votes
1answer
427 views

Get the NID from url [duplicate]

Possible Duplicate: Get a node ID from the URL I have two content types which one referenced to another by url widget, when i click on the link the node id passing with the url. How can i get ...
0
votes
1answer
30 views

Is there any API to get corresponding field in a custom content type?

I have drupal 7 and created a custom "content type" with several fields. just imagine i have: title field subtitle field I need to search the data. I want to search titles and when i found my ...
0
votes
1answer
291 views

Puilling Information From Referenced Entities to Display/Use In A Custom Content Type?

Exposition I have two Content Types with the following fields: Scenes Scene Name Starring (Actor's names) Streaming Link Releases (DVD Releases) Title Description Starring (All actor's names ...
0
votes
1answer
1k views

How to get 'add more items' / multiple fields working when creating a custom content type's create/edit input form using templates and theming (D7)?

For single instances of each field, I've successfully followed arajashe's excellent answer for controlling what input fields get displayed in the content type's create/edit form here: https://drupal....
0
votes
4answers
690 views

Restrict access to text formats for certain role

For every user with role company manager i have made tab My company(in user profile) where user can see node_edit of their company(node). And i need to set default format to plain-text and hide text-...
0
votes
2answers
1k views

No content type problem

When I go to node/add. I see the message showing there is no content type: But, when I go to admin/structure/types. I see three content types I have : What could that be the problem ? I'm using ...
0
votes
1answer
625 views

Creating content types with fields that are other content types?

I have an existing content type in my current Drupal application, person. This contains all of the data you would expect, more or less - name, address, employer, etc. I'd like to create a project ...
0
votes
1answer
849 views

Autocomplete entity reference - Required to select entity

I'm having problems with a required field that is an entity reference. This is my case: I have a content type advertisement that has an entity reference product, what is an autocomplete widget. The ...
0
votes
2answers
1k views

How to show a view of content types on another content type

I have one content type 'class' and I have another content type 'lesson' and I want to easily display all lessons that belong to a class on the view of a 'class.' Is this possible and if so, how?
0
votes
2answers
177 views

How to fix millions of Alt Text are missing on body content?

This question is very similar to my other question. I have a website missing millions of Alt Text in body content(not image field). My solution is to set the default Alt Text as the file name without ...
0
votes
2answers
599 views

How to modify Author Pane date fields?

I have Author Pane installed along with D7 Advanced forum. I am wondering how to shorten the display format of 'Join' and how to remove 'Last seen:' from the pane? I could not see any guidelines in ...
0
votes
2answers
2k views

find Menu Settings of node, given URL alias (or node ID)

In the Drupal 8 screen for editing a node, we have these two sections: URL Path Settings > URL alias Menu Settings (Menu link title, Description, Parent item, Weight) How, given the URL alias ...
0
votes
1answer
495 views

node_load get blank

My page.tpl.php structure is: <ul> <li id="creative-events"> <div class="info animate-in"> <?php node_load($nid = 10); ?> </div> <img class="sky ...
0
votes
1answer
43 views

About shaping the Drupal “add content” pages

My question is that do you change the Drupal "add content" pages appearance and fields for your final version of project? Actually, I really do not know how it is conventionally provided for Drupal ...
0
votes
1answer
1k views

Why page-view counters not working (displayed)?

I have set up to display the page-view (hit) counter, using the Drupal 7 core statistics module, following the standard procedure (see, for example, the summary here). However, (A) only English ...
0
votes
1answer
233 views

Deleting field collection items

There is a content type called library which has a field collection type as a field and unlimited number of this field is allowed. I used Devel module to generate 200 nodes of library, so more than ...
0
votes
1answer
1k views

How to create a child page that has the same content type as parent page?

I enabled the Book module on drupal 7 and created 2 new content types. Let said I created a new "content type A" and "content type B", and keep the book module content type as "Book page". The issue I ...
0
votes
1answer
933 views

How to create custom 403 page for a particular content type?

For a particular content type in my Drupal 6 web site, I do not want the users to see the "access denied" message when viewing an unpublished node. Instead I want to show a more meaningful message. I ...
0
votes
2answers
126 views

How to implement Administration UI notifications for new revisions?

I'm new to Drupal and I'm customizing an administration theme to be designed to our needs. One of the things we would like to have is a visual notification of a new REVISION (content needing ...
0
votes
1answer
382 views

Is this possible? Dynamically changing fieldsets on node creation

(Note that I am not talking about simply hiding/displaying fields conditional upon other fields' values.) This question about programmatically creating fields led to questions about whether it was ...
0
votes
1answer
4k views

Undefined variable: node

Im using views_embed_view('view_name', 'view_block_name', $node->nid); and im getting error Notice: Undefined variable: node in functin include() So in D7 We cant use $node inside page.tpl.php?
0
votes
1answer
2k views

How to use ctools modal to popup some fields of a node on node view?

I want when a user is viewing a node, some of the node fields will be shown as a popup (without any buttons). How can I do it? Thank You!
0
votes
2answers
2k views

How to create submenu based on content type and taxonomy?

I would like to create a submenu that lists items based on content type and taxonomy. Here's the setup. Shop for a Car [Basic Page] Financing Options for cars [Basic Page] loan 1 [Content ...
0
votes
1answer
844 views

Change the way “add content” and “node's” are displayed

I was wondering how one would go about changing the layout of the nodes when you are adding content, as well as when you view the full story. I want certain text to be bigger, some fields to be ...
0
votes
2answers
522 views

How do I add tags to Advanced Forum posts

I would like to add the type of tags this stackexchange forum has, so users can tag their posts and the tags appear at bottom of all posts. How do I do that?
0
votes
1answer
24 views

References module doesn't specify/read a pager limit when field is using a view to generate potential references

Discovered an oddity that seems inherent in the node_reference.module 7.x-2.1. It is a rather specific use-case, so I can see why it might not have come up frequently before. Just wondering if anyone ...
0
votes
1answer
277 views

How is webform node type is defined in webform module?

Reading the webform module code I could not figure out how webform content type is defined. I only found this piece of code: function webform_node_type($op, $info) { $webform_types = ...
0
votes
2answers
1k views

Get/modify taxonomy term info in node edit form field?

How do I modify the taxonomy terms that are listed as a field in my Node edit form? I need to be able to hide/unpublish/disable my taxonomy terms. Since there is no way to "unpublish" taxonomy ...
0
votes
3answers
447 views

Get content page field value

I have a content page contain three field. Number A: Number B and Total Number. During add content page, I fill up Number A: 20 and Number B: 30. How to let Total Number auto display 20 + 30 = 50?
0
votes
2answers
333 views

How do I create custom content types in drupal?

I need to create a content type that is similar to a textarea, but I need to do some server side formatting before it can go out to the page. I want a user to be able to input a chunk of text, then ...
0
votes
1answer
266 views

webform submission details not getting displayed

i have multiple nodes each per language and the default is English(node/1). For french node(node/2) after submitting the details of the contact form, the details not getting displayed in Webform-...
0
votes
1answer
861 views

How to create and add a page to a book programmatically?

I have studied create nodes programmatically and create a book page but still i did not find how to create and add a page to the existing book. How to set parent child relationship if applicable. I am ...
0
votes
1answer
486 views

How do I convert the result fro views_get_view_result() to an array?

I am getting an object from views_get_view_result(). Array ( [0] => Drupal\views\ResultRow Object ( [_entity] => Drupal\node\Entity\Node Object ( [...
0
votes
1answer
2k views

Render a custom region inside node template [duplicate]

I am attempting to render a menu assigned to a block right next to the body of a custom content type. I am using Drupal 7. I have a custom region defined within my template .info file. I would like ...
0
votes
2answers
409 views

How to stop infinite loop on hook_node_grants

I am using hook_node_grants to provide access to a realm based on whether someone is an 'owner' of a node. The issue is that menu_get_object() may call hook_node_grants recursively. function ...
0
votes
1answer
177 views

How to put a node in a menu using an URL parameter?

While creating a new node, I'd like to pass a parameter in the URL: node/add/page?plid=123 in order to put the newly created node in this menu item as its child. I tried to hook_form_alter() the node ...
0
votes
1answer
476 views

How to display node details and call function in *.html.twig

I work in D8, I create a custom module first_module. By modules create a url and display all nodes by *.html.twig file. Write code in controller.php public function contentthree() { $connection = ...
0
votes
1answer
190 views

How to sort the blog

I am trying to sort blog by title. The blog does not appear at view. Taxonomy does not has any setting related to sort. What else I should check?
0
votes
2answers
103 views

Spam filter in signatures?

Since otherwise great spam module does not check user signatures for spam, I have hard times fighting spammers who just put their spam links in their signatures in the forum so basically they rendered ...
0
votes
2answers
199 views

How to show/hide the prefix/suffix of fields in node templates?

I previously asked a question about hiding the prefix/suffix in fields template here, now I want to understand how can I programmatically hide the prefix or suffix of numeric fields in nodes templates ...
0
votes
1answer
287 views

Drag and drop nodes in a node list (to later use that sorting inside a view) [closed]

Under example.com/en/admin/content I show all site content filtered by content type and then I get a list of all nodes from that content type. The nodes will appear in some sorting (usually date). ...
0
votes
3answers
621 views

Display of content-type

I've got custom content-type with several groups and fields. I want to change default display of that content-type. In which file can I find appropriate code?
0
votes
2answers
328 views

Increase weight range for child pages in book outlines (Book module)

When a child page is added to a book via "Add child page" (node/add/{content-type}), the Weight drop-down field in the Book Outline tab has a range of -/+ 15. This is due to line 191 in web/core/...
0
votes
3answers
962 views

programmatically getting custom node belonging to a term

have searched google but cannot find anything specific . Intention is to get all Custom Node types that have been assigned a specific term of vocabulary . for example the follwoing is a db query to ...
0
votes
2answers
793 views

How to add dynamic fields with condition?

I have a website that is about automobiles, I want when a user choose a brand drupal shows some of its models: This image show an example: for example I want when a user selected BMW drupal shows ...
0
votes
3answers
522 views

How do I get 2 separate displays of a view in one page that are displaying contents from two different content types?

For example, I have a Page view which displays Content Type A Title, Post date and categories. This page will lists out all of the matching contents that this user has published. Then I created a ...