Thread: New template
View Single Post
  #8  
Old 04-16-2003, 11:15 PM
 
funkydunk funkydunk is offline
 

X-Man
  
Join Date: Oct 2002
Location: Cambridge, UK
Posts: 2,210
 

Default

Okay,

your php script should be:

Code:
<? // amendments by funkydunk.net 2003 // this file to be included in customer/home.php using include "./thisscript.php"; $SQLCon = "SELECT title,ID,description,category,date FROM articles WHERE visible = 1 AND date<=NOW() AND category<>10 ORDER BY date DESC, ID DESC LIMIT 7 "; $newsItems = func_query($SQLCon); $smarty->assign("newsItems",$newsItems); ?>

This shoudl be included in customer/home.php

Then in your template:

Code:
{section name=news loop=$newsItems} Title: {$newsItems.title} {/section}
should be changed to:

Code:
{section name=news loop=$newsItems} Title: {$newsItems[news].title} {/section}
__________________
ex x-cart guru
Reply With Quote