By sjames on
drupal-4.6.4
http://www.shreemaa.org
I would like to limit the number of posts on the front page to 3 with a time limit of 2 days.
I don't see a setting for this in my drupal dist.
can anyone help?
thanks.
Susan
drupal-4.6.4
http://www.shreemaa.org
I would like to limit the number of posts on the front page to 3 with a time limit of 2 days.
I don't see a setting for this in my drupal dist.
can anyone help?
thanks.
Susan
Comments
front page content
change the number of posts on the front page at content|configure.
I'm using 4.7 and having the same problem
I have changed the number of posts on the first page and then it just adds more pages with links at the bottom so you can scroll through and see when everything was loaded in.
Not what I want. 5 latest entries on the front page and go to the index page to find the rest is what I want. How do you get ride of those links?
Nobody knows how to get rid
Nobody knows how to get rid of the links? The theme I'm hacking is bluemarine.
You would want to uncheck
You would want to uncheck the promite to front page box manually to prevent the pager list on the bottom. You could also look in to scheudler module, I believe it can promote/demote pages on a user determined schedule. Not entirely sure though.
-Steven Peck
---------
Test site, always start with a test site.
Drupal Best Practices Guide -|- Black Mountain
-Steven Peck
---------
Test site, always start with a test site.
Drupal Best Practices Guide
Thanks. I'll look into the
Thanks. I'll look into the scheduler module. I want stuff to be on the front page so users will see the new stuff, but not to have it there forever. And having it done automatically would be a big plus.
Let us know...
Let us know what you find.
i.e. if the scheduler module works.
thanks!
On the surface, the Schedule
On the surface, the Schedule module looked like it was going to work. But how it takes items off the front page is by unpublishing them. I've put in a feature request to add an option to take away "promote to the front page" but not to unpublish, but I don't know how long that's going to take.
I looked at Cron jobs, and while I think I understand it well-enough to set one up, there doesn't seem to be a list of commands that are okay to use. Anybody have any ideas how to make a cron job to unpromote items that are over a week old? Is it even possible to do?
At this point, if the cron job idea is just a pipe dream, I think I'm going to have to use PHP snippets to create a new version of the page and keep the automatic promote-to-the-front-page off.
Try changing the database field node.promote
A naive first glance reveals a field "promote" in the node table. Try this: Let your cronjob set the node items which are not wanted on the front page to "0", depending on the value of the "created" or "changed" field.
Front Page Demotion fix
My friend Billy came up with the script, and SiteGround and Drupal members helped come up with the rest of these instructions.
Replace what you need to to apply it for your Drupal site.
Hope this helps someone else.
Much easier
To make a module that implements hook_cron and runs this query.
--
The Manual | Troubleshooting FAQ | Tips for posting | Make Backups! | Consider creating a Test site.
I'm sure it is, but I don't
I'm sure it is, but I don't know how to make a module.
Anyways, it's messy but it works. Hopefully, they make the changes to the Scheduler module and we'll be able to just use that.
Extreme Minimal Module implementing hook_cron
Create the file mylittlemodule.module (in modules/mylittlemodule)
Contents:
(omit the last ?> from the file). To beautify, also implement hook_help.
--
The Manual | Troubleshooting FAQ | Tips for posting | Make Backups! | Consider creating a Test site.
home page- pager
drupal-4.6.4
http://www.shreemaa.org
is this the code to use:
=============
from the file).?
is this just a module rather than a cronjob?
thanks.
Susan
views
This can easily be done with the 'views' module.
(I hope I haven't forgotten anything.)
No, that's not a good idea, because this setting governs lots of other lists too.
views- more
drupal-4.6.4
I installed the views module and enabled it in modules.
I also added the tables to the database.
but, where do I do this stuff:
# check 'Provide Page View', uncheck 'Use Pager', enter '3' in 'Nodes Per Page'.
# in 'Filters', add 'Node: Front Page' (or 'Node: Promoted', whatever you prefer).
# in 'Filters', add 'Node: Created Time'.
etc.
I don't have a 'views' in settings.
where is the above done?
thanks for your help!
Susan
views
drupal-4.6.4
ok. I couldn't see Views because I didn't allow access.
now, I can see it and the config page.
but, it's different than your steps.
below is what I see on my 'Views' config page.
all I want to do is limit the number of pages on the home page pager to 1.
I don't see a way to do that with this module. can anyone clarify?
thanks!
Susan
==================================
Add a View
Display
Name:*
The name of the view. The URL of the view will be views/NAME. If a block, this will be the unique identifier for the block. Since this is a URL, please do not use spaces!
Description:
A description of the view for the admin list.
View Type:
How the nodes should be displayed to the user.
Title:
The title of the view will be shown at the top of the view. May be blank if not using a block.
Header:
Text to display at the top of the view. May contain an explanation or links or whatever you like. Optional.
Input format:
More information about formatting options
Table
Fields in this section will appear in the table in this order, only if List Type above is set to Table.
Add a Field:
Block
Provide Block
If checked this view will be provided as a block. If checked title may not be blank.
Nodes per Block:*
If using a block, the maximum number of items to display in the block. Pagers are not used in blocks.
Display Header
If using a view as both a block and URL, display the header in the block?
URL
URL Type:
Choose whether or not to provide a URL and a Menu entry for this view..
Pager
Use Pager
If checked this query may be multiple pages. If not checked this query will be one page.
Nodes per Page:*
The number of nodes to display per page. If 0 no nodes will be displayed. If not using a pager, this will be the maximum number of nodes in the list.
Current Arguments
This view does not accept arguments
Add an Argument
Argument:
If using a URL and you want it to accept arguments, this is how to parse the argument. For example, "views/VIEWNAME/1" could produce nodes authored by User ID #1 if this field is set to User ID. It can accept multiple, successive arguments..
Argument Default:
If argument 1 was specified, what action to take if the argument is not given.
Filters
No filtering Criteria Specified
Add Filter
Filter:
Use this box to add a new Filter
Sorting Criteria
The order of criteria from top to bottom determines which fields will be sorted first.
Add Sorting Criteria
Criteria:
Order:
Use this box to add a new sort criteria
==================================================
Now that I've gone live, the
Now that I've gone live, the CRON job solution isn't working. *Sigh*
I'm looking at the views solution, since I had to add it for something else. I have a Front Page view listed that has most of the list already created on it, but I can't find this one:
I'm using drupal 4.7.2 and the filters doesn't seem to have a place to put in conditions.
EDIT: Never mind. Played with it some more and got it working.