1

I am looking for a way to schedule "Promoted To home page" nodes to appear after a particular time.

When user creates a new node and checks "Promoted To home page", it should not appear immediately on publish on the homepage.

Then need a scheduler which set "Promoted To home page" nodes to appear on front page.

The node will published and visible if accessed directly or seen in other section.

2
  • Could you give a more detailed description of the steps the user takes in this scenario. (e.g. Is published checked or unchecked when creating the node?
    – devunder
    Commented Feb 20, 2017 at 7:34
  • @undersound published can be checked or unchecked at the time of creation as I can make a conditional check in the script to show published checked only.
    – Puneet
    Commented Feb 20, 2017 at 8:45

1 Answer 1

0

You can do this using the Rules module in combination with the "Rules Scheduler" (a submodule of it). After you enable these 2 modules, create a Rules Component and a Rule. Here is a blueprint of doing so:

  • Create a Rules Component which accepts "node" as a parameter, and which has a Rules Action to set the node to "published".
  • Create a Rule like so:
    • Rules Event: Before saving a new node.
    • Rules Actions: (1) set the node to "unpublished" (to be sure it is not "published" when the node is saved) and (2) schedule the Rules Component created in the previous step.

Note: From the comment below this answer (which states "The node will remain Published all the time.") it doesn't seem to apply for the question here, but using a similar approach you could also schedule another Rules Component to mark it unpublished again later on, eg X days after the node gets published. In that case, you use Rules Event "After updating an existing node", combined with a Rules Condition to check if the update changed "unpublished" to "published".

1
  • Thanks for the reponse. The node will remain Published all the time. The only case is to show on homepage after a certain time.
    – Puneet
    Commented Feb 20, 2017 at 8:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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