Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 433247
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T20:09:18+00:00 2026-05-12T20:09:18+00:00

I am trying to add some additional logic to the ‘Promoted to front page’

  • 0

I am trying to add some additional logic to the ‘Promoted to front page’ feature in Drupal 6. That is, rather than the boolean behavior there by default, I would like to add additional criteria that a node must meet before appearing on the home page.

Specifically, I don’t want past events (as determined by a CCK Date field) appearing on the home page even if they are promoted.

Is there a way I can replace the content produced by node_page_default()? The SQL there isn’t dynamically generated, so I imagine the output would need to be replaced entirely.

(I realize that all this could be accomplished via Views, or maybe hook_cron, but I would prefer not to use those methods for a relatively minor quirk.)

Thanks in advance!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T20:09:19+00:00Added an answer on May 12, 2026 at 8:09 pm

    As node_page_default() calls db_rewrite_sql() on the query, you might try implementing hook_db_rewrite_sql() in a custom module to add your additional restriction. I do not recommend this, as you’d need to somehow recognize the original query in your hook implementation, and this would be fragile – other modules might rewrite it also, and it could change anytime with an update, thus breaking your change.

    Alternatively, you could create your own version of node_page_default() by copying it to a custom module, modifying it as you need (don’t forget to rename) and then implement hook_menu_alter() to swap the original page callback to node_page_default on the ‘node’ path with your customized version. (You could also register your own frontpage path using your customized callback via hook_menu() and adjust your frontpage setting to point to that one.)

    But in case you already use the views module in your site, I’d recommend saving all this work and just enabling the provided override for the frontpage view, adjusting its filter settings accordingly.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to add some additional key/value pairs to an NSMutableDictionary, using: Tag *tag1
I am trying to add some error detection to a script that is used
I am trying to add some logic in this. But I am not sure
I am trying to add some additional html to a div with id slideshow
I'm trying to add some additional lines to a table in FOP, to fill
I'm using mongoose (on node) and I'm trying to add some additional fields to
I am trying to add some additional things to an array but am getting
I am trying to add some basic dynamic functionality to a web page. How
I'm trying to add some additional functionality to an API. However, I'd like these
I'm trying to add some additional static data to an inbound http message (received

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.