Ok, a little background info first. I'm using Drupal 4.5.0 as a personal blog. I currently have Drupal set to show "node" as my "Default front page". Drupal is set to automatically tick the publish & promoted flags for blog entries. I also have the "Number of posts on main page" set to 10. This has the effect of displaying the last 10 blog entries on the front page.
Now for what I'd like to do. I'd like to set Drupal to show only X number of entries per page for a given period, say for the past 2 weeks or maybe the current month, etc. At the very least, I like to display ONLY the past X number of entries. Although Drupal currently limits my displayed entries to 10 per page, it allows access to ALL the blog entries via page links (1, 2, 3, n, n+1 next page last page) at the bottom of the page. I basically want to add another limit on the entries displayed. So, for example, it would show only 10 entries per page but then only show the entries for the current month. Depending on how many posts I make per month, I might still rack up a couple pages worth of posts. I'd then allow readers to access previous entries via an archive link.
What would be the best way to accomplish this? Trying to stick with the speration of structure and content, this seems like a structure kind of thing. I believe other blog-centric CMS's allow this.
TIA,
-Chris
Comments
Let me add to my request. I
Let me add to my request. I don't really know where changes should be made, i.e. what module to modify, if such changes are required. It may be simplier to add this restriction to the themes. I'm lazy, so if this accomplishes my goals way easier than modifiying modules, then I say screw structure/content seperation.
Anyone? Anyone?
Does this even sound do-able? I must admit, I'm not a programmer, but know enough to get by. I'd just like reassurance that this is possible, before I dive into modifications (if necessary). Given my knowledge of Drupals design (which isn't much), it sounds like this should be fairly simple. Possibly even accomplished with a module, which would be ideal as it allows for upgrading.
Did you ever get this resolved
I am looking to do the same and would appreciate any guidance that anyone might have regarding this issue. Alternatively I am willing to cooperate to help code a patch for this.
I dont really know the right
I dont really know the right way to do it, but my approach would be to use a specific node as the home page (via settings). I would set the content type to php and would write an sql query limited to the past month, something like (not tested, just a rough idea)
Remember, this code is untested and more that likely wont work as is, but you get the idea ;)
You can then loop through the recordset and theme your node - check out the php page snippets in the handbook http://drupal.org/node/23220 for more detailed and accurate information.
hth