News module: 1) set length to display? 2) multiple pages?

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Locked
kevin360

News module: 1) set length to display? 2) multiple pages?

Post by kevin360 »

Hi I've got two questions about the News module.

1) In the help section it states this:

(optional) moretext="more..." - Text to display at the end of a news item if it goes over the summary length. Defaults to "more..."

How do you set the summary length though?  I've tried using length="5" and that doesn't work.  What I'm looking for is where I can type everything into the details section and when it displays my list of news articles it will only show a certain number of lines and then have the "more..." button, so to read the entire article you press that and it'll pull up the full article.

2) If you've got more news articles then you want displayed on a single page, is there anyway to have it automatically have a page button at the bottom?  Let's say I've got 17 articles and I want 5 shown at a time.  When you go to the main news page it'll show the top five and then at the bottom would be a button for next page.  Click that and it shows articles 6-10 with another button.  Click that and it goes to 11-15, etc.  I realize I could do this manually, create the front page showing the first 5, manually create a second page that starts at number 6 and displays 5, etc.  The only problem is that as articles are added you'd have to keep updating the last page and adding pages for every five.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: News module: 1) set length to display? 2) multiple pages?

Post by Dr.CSS »

the news module summary with more link is the top edit box, when you make the article, you can copy/paste the first few lines from your article in there, if you use the default Detail template it will show your summary in bold, you can make your own Detail template that won't show the summary or change the default by deleting this line from the Detail template... and you will just get the main article

{if $entry->summary}


{eval var=$entry->summary}


{/if}

this is a thread on pagination for News, it would be nice if a PHP wiz could make this happen...

http://forum.cmsmadesimple.org/index.ph ... l#msg30640
Locked

Return to “CMSMS Core”