1

I need faster way to promote a node I'm looking at.

I usually go for:

Is there a faster way than that? The idea is to have a "Make this sticky" tab or link.

  • Please, try to specify what exactly you want. And what exactly you tried so far. And where exactly you are stuck. As the answer to your question right now simply is: yes. And there's not just one way, there are probably thousands. And that makes your question too broad. – leymannx Mar 10 at 20:26
  • Thanks Leymannx. Out of your thounsands, please only post your 5 closest answers to my question. I'm sure our community will appreciate your support :) – augusto Mar 10 at 20:43
  • Back to your request of clarification, please note this is about improving of the core user interface. So, it's probably a good idea to think it with a wider view. Thanks – augusto Mar 10 at 20:50
0

Sure, you can simply add any field to your node type and use that. Let it be a simple checkbox for example. Hide that field from node display. It should just be displayed on the form display. Put it in a prominent position. Finally, via hook_form_alter add another submit handler that then checks the input of that checkbox and sets the node's sticky value accordingly.


I just released Toggle Sticky Toggler. Which adds a "Make Sticky / Unmake Sticky" tab next to the default "Edit" tab.

enter image description here

  • Interesting. Thanks. Actually, expecting something easier to implement. – augusto Mar 10 at 20:45
  • @augusto – Easier than that? Do you mean easier as in UI-only? Then just edit the view or the view attachment which displays the sticky nodes to accept your custom checkbox value as well. – leymannx Mar 10 at 21:00
  • 1
    @augusto – Updated answer. Released a module. – leymannx Mar 10 at 23:05
  • Schöen. Gut gemacht, leymannx :) – augusto Mar 11 at 8:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.