First step, edit postauth.php which is under root folder. Find
$pages_menu = func_query(“SELECT * FROM ” . $sql_tbl[‘pages’] . ” WHERE language='” . $store_language . “‘ AND active=’Y’ AND level=’E’ AND show_in_menu=’Y’ ORDER BY orderby, title”);
$smarty->assign(‘pages_menu’, $pages_menu);
Add the following codes below them:
//dental loupes faq begin
$pulled_articles= func_query(“SELECT * FROM ” . $sql_tbl[‘pages’] . ” WHERE language='” . $store_language . “‘ AND active=’Y’ AND level=’E’ ORDER BY orderby DESC LIMIT 3”);
$pulled_articles= func_query(“SELECT * FROM ” . $sql_tbl[‘pages’] . ” WHERE language='” . $store_language . “‘ AND active=’Y’ AND level=’E’ ORDER BY orderby DESC LIMIT 3”);
$loupe_articles = array();
foreach ($pulled_articles as $article){
$pages_dir = $xcart_dir . $smarty_skin_dir . ‘/pages/’ . $article[‘language’] . “/”;
$filename = $pages_dir.$article[‘filename’];
$page_content = func_file_get($filename, true);
$article[‘page_content’] = $page_content;
$loupe_articles[] = $article;
}
$smarty->assign(‘loupe_articles’, $loupe_articles);
//dental loupes faq end
//dental loupes faq end
Second step, go to skin/light_responsive/customer/main/, and edit welcome.tpl, find:
{include file=”customer/main/featured.tpl”}
Under it add the following codes:
<div>
<div>
<h2>{$lng.lbl_articles}</h2>
</div>
{foreach from=$loupe_articles item=p name=loupe_articles}
<div>
<h3><a href=”pages.php?pageid={$p.pageid}”>{$p.title|amp}</a></h3>
<div>
{$p.page_content|truncate:250|strip_tags:false}
</div>
</div>
{/foreach}
</div>
<div>
<h2>{$lng.lbl_articles}</h2>
</div>
{foreach from=$loupe_articles item=p name=loupe_articles}
<div>
<h3><a href=”pages.php?pageid={$p.pageid}”>{$p.title|amp}</a></h3>
<div>
{$p.page_content|truncate:250|strip_tags:false}
</div>
</div>
{/foreach}
</div>
Last step, login admin panel, go to content–>language, and find Add new entry:
Add new entry
Select topic: Labels
Variable: lbl_articles
Value: Dental Loupes FAQs
Select topic: Labels
Variable: lbl_articles
Value: Dental Loupes FAQs
Done!