how to add faq in first page

Questions and answers about change of functions, design, hosting etc.

Moderators: Koduc, Xpycm

Forum rules
Pay attention! Forum is not a means for guaranteed support of clients and users. An answer as well as a quick answer is not supposed on the forum. We post messages as soon as possible.

The message limit on the forum is 3 messages per day.
If you want to say "thank you" then use the function "Give good reputation point", which is a green icon "plus" under the nickname of the person, who answered the message.

how to add faq in first page

Postby saha66 » 18 Nov 2014, 09:50

Hi,

I want to know how to add some faq articles in first page the same as news.

I want to add the 3 last articles in the first page.

Thanks in advance
saha66
Passer
 
Posts: 30
Joined: 28 Aug 2014, 09:31
Reputation point: 0

Re: how to add faq in first page

Postby andipas » 18 Nov 2014, 10:31

file - themes/classic/views/site/index.php

a simple example:

Code: Select all

$articles 
Article::getLastArticles();
foreach(
$articles as $item){
    echo 
CHtml::link($item->getStrByLang('page_title'), $item->getUrl());
    echo 
$item->getStrByLang('page_body');
    echo 
'<hr>';
}
 
andipas
Web Developer
Web Developer
 
Posts: 156
Joined: 28 Dec 2011, 22:37
Reputation point: 1


Return to Questions and help for changes

Who is online

Users browsing this forum: No registered users and 42 guests

cron