MOD OPTION 1 - for Template-specific Use Only:
One of the sNews development objectives is to keep the snews.php (engine) file separated from any theme or template styling. That way you can continue to add core modifications to your snews.php file and use it with any template or theme. This option allows you to do that... by creating a new function - based on a copy of // MENU ARTICLES
- to do the same work without affecting the default // MENU ARTICLES function
in the snews.php file. This also allows you to display the default menu articles list as well as the "Latest News with intro text".
1) Take a copy of the complete // MENU ARTICLES function
and paste it into a new PHP file... and wrap it with opening and closing PHP-tags.
2) Save this file into your sNews site's root directory (along side of the index.php and snews.php files) as lead_articles.php
3) Change the name of the function to function lead_articles($start, $size)
4) Modify the function as shown in Vasil's Mod.
5) Add an "include" statement at the top of your template (index.php) file, just below the "include" statement for your snews.php file.MOD OPTION 2 - with Bakercad's Template Switcher (Admin Panel) Mod:
Bakercad's Template Switcher Mod allows you to have several templates (themes) located in a separate folder and you can switch site-wide templates from the Settings Admin Panel. If you have installed the Template Switcher Mod, and you want use this Latest news with intro text
mod within a specific template, (as I do)... you can apply it this way.
1) same as above in Option 1.
2) Save this file in your template folder as lead_articles.php
3) same as above in Option 1.
4) same as above in Option 1.
5) Add an "include" statement to include the new file, just below the "include" statement for your snews.php file... located in the index.php file in your sNews site root:
# INCLUDE template-specific file for lead articles only
mysql_query("UPDATE ".db('prefix')."settings SET value = 'default' WHERE name = 'template'");
Be sure to change the template folder name to whichever template folder the file is located in... the script above shows a template folder name of main1
as an example only.