A client wishes to regularly change the number of news items/teasers shown on the home page.
Is there a way to enable them to do this, perhaps with a field where they can type a number?
Something like…
How many news items to you want to display?
[4]
[Solved] Client decides the number of news teasers
[Solved] Client decides the number of news teasers
Last edited by Reclus on Fri Aug 01, 2014 11:48 am, edited 1 time in total.
Re: Client decides the number of news teasers on the homepag
Add a category called "Show on home page" and then adjust your module call to show only items in that category?
Re: Client decides the number of news teasers on the homepag
Check the module: Custom Global SettingsReclus wrote:Is there a way to enable them to do this, perhaps with a field where they can type a number?
Re: Client decides the number of news teasers on the homepag
Add an additional content block as the first line to your page template
After that modify your news module call like
Code: Select all
{content block='newscounter' oneline=true wysiwyg=false label='Number of News' size='3' assign='newscounter'}
After that modify your news module call like
Code: Select all
{if isset($newscounter) && ! empty($newscounter) && is_int($newscounter)}
{News number=$newscounter}
{else}
{News number='3'}
{/if}
Last edited by chandra on Sat Aug 02, 2014 6:28 am, edited 2 times in total.
Re: Client decides the number of news teasers on the homepag
Thanks very much chandra, simple solution and works a treat!
Re: [Solved] Client decides the number of news teasers
You better add a check if the filled in value is a number and not text or something...
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Re: [Solved] Client decides the number of news teasers
Nothing is easier like that - example modified
.
