First, I would like to say a big thank you to the development team for this wonderful CMS. I've tried several, and there were things that I liked and hated about them all, and even though I've used some of them for years, finding another "right" one was always in the back of my mind. I honestly believe that I've finally found exactly what I've been looking for in CMSMS. Like everything made by human hands, it's not perfect, but it's as close as I've found so far! Great work guys 'n' gals!
Ok...now for my question (I searched the forum archives but didn't find this addressed)...I'm wanting to use the news module in blog fashion, and want to split up the post into the most recent X number of entries on my main page, and then show other "archive" pages that will show groups of X entries going back in time. I figured that the main page would just show the 10 most recent postings, and then the first archive would start at 1, show 10. Second archive page would start at 11, show 10, etc. I figured I would have to keep track of the news posts I've made, and then create another archive page every 10 (or however many) posts...not ideal, but not trememdously hard for right now either.
Well, tonight I reached a total of 12 postings and since showing all of these on one page had gotten quite long, I decided to do my first archive page. I was going to show the most recent 10 postings on main page, and then on the archive page told it to start at number 1 and show 10 entries. This should have given me a total overlap of 8 stories that would show on both the main and archive page. (this correct??).
When I created the archive page, for some reason it is skipping the number 1 post (the very first one that I made). I tinkered with this a bit, and then just for the heck of it I changed the sort on the page (nothing else, just the sort option)...and now it's starting from number 1 like it should, albeit placing this one at the top of the page instead of the bottom where I would prefer.
Am I missing something here? Should changing the sort order change the numbers of the postings? Are then postings ordered with the first post in time being the number 1 (first) post?
Lastly, are there any plans to include some sort of auto-archive feature into the news module (this would be GREAT!)
Again, thank you for this product, and thank you all in advance for the help.
Ricky
Praise for CMSMS team, and news module question...
-
cyberman
Re: Praise for CMSMS team, and news module question...
Please look at CMSms Forge project news - there are some patches which can do something you want (pagination, archive) ... but I'm not sure if they all will work with current news version.
-
Ricky
Re: Praise for CMSMS team, and news module question...
Thank you sir, I will check that out!
Also, I was going to put this in my original post but you replied before I could edit it, so I'll just post it inline....
I don't know if this helps or not, but I've just noticed that if I use this:
It actually starts at posting 2 and then shows 10 postings. BUT, If I do this:
it for some reason then starts at post number 1...but, it only shows a total of 7 posts.
Wierd.
Oh well, I'll check the place you suggested and maybe it'll give me what I'm looking for. Thank you again.
(edit-added this)
Well, I think I have figured out what it is doing. when you tell it number=X and start=Y (and default desending sort order) starts counting backwards from the most recent post number and goes back Y number of posts, and then shows X posts going back in time. when you tell it to sort in ascending order, it starts at the first post, goes forward y number of posts and then shows X number of posts. I think I've explained this correctly...
This explains why simply changing the sort order results in a completely different set of posts on any given page, but seems that it will make it a major PITA to manually do any pagination and archiving of the news posts. Entering in a new posting creates a new post number, but then deleting that post removes the number, so any manual counting is then out of whack because you have to keep up with post number to skip when counting the posts to be displayed. ARG!
I did look at the project news, but didn't see anything that looked like it would apply to what I'm trying to do, but i'll keep digging. Luckly I don't make that many news posts, so maybe I'll just let them keep growing the page and hope for an update to the news module in the meantime.
Also, I was going to put this in my original post but you replied before I could edit it, so I'll just post it inline....
I don't know if this helps or not, but I've just noticed that if I use this:
Code: Select all
{news category="whatever" number="10" start="1"}
Code: Select all
{news category="whatever" number="10" start="5"}Wierd.
Oh well, I'll check the place you suggested and maybe it'll give me what I'm looking for. Thank you again.
(edit-added this)
Well, I think I have figured out what it is doing. when you tell it number=X and start=Y (and default desending sort order) starts counting backwards from the most recent post number and goes back Y number of posts, and then shows X posts going back in time. when you tell it to sort in ascending order, it starts at the first post, goes forward y number of posts and then shows X number of posts. I think I've explained this correctly...
This explains why simply changing the sort order results in a completely different set of posts on any given page, but seems that it will make it a major PITA to manually do any pagination and archiving of the news posts. Entering in a new posting creates a new post number, but then deleting that post removes the number, so any manual counting is then out of whack because you have to keep up with post number to skip when counting the posts to be displayed. ARG!
I did look at the project news, but didn't see anything that looked like it would apply to what I'm trying to do, but i'll keep digging. Luckly I don't make that many news posts, so maybe I'll just let them keep growing the page and hope for an update to the news module in the meantime.
Last edited by Ricky on Wed Dec 06, 2006 5:26 am, edited 1 time in total.
Re: Praise for CMSMS team, and news module question...
Did you try start="0" being as we are using computers and most digital things start at 0...
-
cyberman
Re: Praise for CMSMS team, and news module question...
You were right - perhaps there's some mistake in docu. Please tryRicky wrote:It actually starts at posting 2 and then shows 10 postings.Code: Select all
{news category="whatever" number="10" start="1"}
Code: Select all
{news category="whatever" number="10" start="0"}
http://wiki.cmsmadesimple.org/index.php ... fined_Tags
-
Ricky
Re: Praise for CMSMS team, and news module question...
sorry guys, was adding some stuff to my last post whiile the two of you were entering in your posts. (please read, it shows what I think is happening).
I DID try using start=0 after reading your posts, and it then doesn't work at all with the default sort order: it starts at the current post and goes back X number of posts. Sorting it ascending does work though (see above post) as it now starts from "0" or the first post (but it's displayed with oldest first).
I think there's a logic bug in the code here; simply changing the sort order should keep the same set of posts displayed, just sort them whatever way. It's actually picking the posts to display based upon the sort order (again, see above last post by me).
Thanks for the help! You guys are quick here!
I DID try using start=0 after reading your posts, and it then doesn't work at all with the default sort order: it starts at the current post and goes back X number of posts. Sorting it ascending does work though (see above post) as it now starts from "0" or the first post (but it's displayed with oldest first).
I think there's a logic bug in the code here; simply changing the sort order should keep the same set of posts displayed, just sort them whatever way. It's actually picking the posts to display based upon the sort order (again, see above last post by me).
Thanks for the help! You guys are quick here!
-
Ricky
Re: Praise for CMSMS team, and news module question...
That was what I needed, working like a champ now!cyberman wrote: For pagination please look here too
http://wiki.cmsmadesimple.org/index.php ... fined_Tags

