This is a discussion on Latest Article on index page within the osCMax v2 Customization/Mods forums, part of the osCMax v2.0 Forums category; here is a very easy way to add your latest article on your index page. in index_default.tpl.php just before the ...
| |||||||
| Register | FAQ | Donate | Members List | Calendar | Mark Forums Read |
|
#1
| |||
| |||
| here is a very easy way to add your latest article on your index page. in index_default.tpl.php just before the last </table> add: Code: <tr>
<td class="main">
<?php
$article_info_query = tep_db_query("select a.articles_id, a.articles_date_added, a.authors_id, ad.articles_name, ad.articles_description" . TABLE_ARTICLES . " a left join " . TABLE_AUTHORS . " au using(authors_id), " . TABLE_ARTICLES_DESCRIPTION . " ad where a.articles_status = '1' and ad.articles_id = a.articles_id and ad.language_id = '" . (int)$languages_id . "' order by a.articles_date_added desc limit 0,1");
$article_info = tep_db_fetch_array($article_info_query);
?>
<table border="0" width="100%" cellspacing="0" cellpadding="2" align="center" bgcolor="#b6b7cb">
<tr><td class="infoBoxHeading" align="center">Latest Article: <?php echo $article_info['articles_name']; ?></td></tr>
<tr><td class="productinfo"><?php echo $article_info['articles_description']; ?></td></tr>
</table>
</td>
</tr>
|
| The Following User Says Thank You to wowsaver For This Useful Post: | ||
michael_s (03-11-2010) | ||
|
#2
| ||||
| ||||
| That is a useful bit of hacking. I am sure it will get a lot of use! I appreciate you posting it up.
__________________ Michael Sasek osCMax Developer *** Do not PM me requesting paid help. The only paid work I do is for AABox Web Hosting customers *** Stay Up To Date with everything osCMax: Free osCMax Newsletters - Security notices, New Releases, osCMax News osCMax on Twitter - Up to the minute info as it happens. Know it first. osCMax User Manual - osCMax Templates - Advanced Template Tutorial |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to edit index page | madone | osCommerce 2.2 Modification Help | 2 | 03-16-2009 10:14 AM |
| the index page | rickarooni | osCMax v2 Customization/Mods | 4 | 07-06-2008 10:58 AM |
| catalog index page | melm81 | osCMax v2 Installation issues | 1 | 12-19-2005 06:56 AM |
| Help! First page index.php is blank | freddae | osCommerce 2.2 Modification Help | 1 | 01-03-2005 02:41 PM |
| MS2 Max 1.5 - cannot go back to index page | goldie | osCMax v1.7 Discussion | 2 | 10-21-2003 10:19 AM |