1

Standard Drupal comes with a "promote to front page" when creating new content. But I want know how to promote, let's say News flow to the block located to the right?

As far as I know there is no "url" for blocks so I can't really use view to assign my news flow to the blocks url. So how do I do this the easiest way?

1

I complete the previous answer about Drupal 8.

In Drupal 8 with Views (include in core) it's exactly the same way.

Add a 'Promote to block' checkbox field on your News content type.

Then in Views you can create a new View or you can go in the "Content" View. Then create a new "Block". Describing all Views functionalities would take a long time, but in this block you can filter all your content, particularly in the Filter Criteria sections where you can filter in order to take only News content type with only the 'Promote to block' option checked.

If needed, search for some Views tutorials. It's quite easy and very powerful.

Then call this new block instead the old one.

  • If you just want to use the Promote to front field, then you don't have to create another 'Promote to block' field. Then in Views, you filter on 'Promote to front'. You can do everything you want in Views – Gaius May 4 '16 at 15:40
0

Just use the Views module to create a block display. And within the block settings specify that you only want to show it on the "front page". The fields to be shown are probably only the title of the nodes you want to see included in that block. with that you've reduced your question (challenge) to selecting the appropriate Views "filter" and "sorting".

To filter your nodes, you could add an extra field to the content types (like your "News"?) you want to see included, whereas that field is just a boolean to yes/no indicate if it should be shown in that block.

If you'd want to make it a little more flexible (dynamic), you could also use the Flag module, and allow authorized users (with appropriate roles to set such flags) to flag whatever should be included in that block. Your view would then become a similar list of nodes that were "flagged".

Enough options to pick from?

PS 1: I'm assuming this question is about Drupal 7 ...

PS 2: for D8, Views is in core ... and for Flag there is a 8.x-4.x-dev release, for which the current status is "Under active development, but not yet ready for production."

  • Not suported by Drupal 8, thats one of the main reasons i asked the question :P – Ezzor May 4 '16 at 15:07
  • @Ezzor : your above comment is a crucial addition to your question, which should have been included in your original question. If you'd still add it now your question becomes a chameleon question (solution to the problem, changes the problem) ... I've updated my answer accordingly ... PS: What exactly is not supported by Drupal 8? – Pierre.Vriens May 4 '16 at 15:12
  • 1
    @Ezzor, Views now ships with Drupal 8 and is ready and safe to use. – Neograph734 May 4 '16 at 15:20
  • 1
    Views is include in Drupal core since Drupal 8 ! @Pierre.Vriens give you a good way to do this on DP7, but it's totally doable on DP8. – Gaius May 4 '16 at 15:21
  • 1
    Merci @Neograph734 (my PS 2 crossed your comment ...) – Pierre.Vriens May 4 '16 at 15:21

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.