Sticky record list in newslist page.

In this board you can talk about general questions about phpMyFAQ

Moderator: Thorsten

Post Reply
WWWeb
Posts: 3
Joined: Thu Aug 21, 2014 4:47 pm

Sticky record list in newslist page.

Post by WWWeb »

Hi,

I want to use "Sticky Module" on the newslist.tpl. What I need to change to make it works?

I've pasted code in newslist.tpl:

Code: Select all

           <ul>
                        [stickyRecordsList]
                        <li>
                            <a href="{stickyRecordsUrl}">{stickyRecordsTitle}</a>
                            <small style="line-height:8px;">{stickyRecordsContent}</small>
                        </li>
                        [/stickyRecordsList]
                    </ul>
But the phpMyFaq system doesn't process the code. And instead sticky record list I see TPL syntax:

Code: Select all

{stickyRecordsTitle} {stickyRecordsContent}
Thanks for help.
Greetings
Thorsten
Posts: 15562
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Sticky record list in newslist page.

Post by Thorsten »

phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
WWWeb
Posts: 3
Joined: Thu Aug 21, 2014 4:47 pm

Re: Sticky record list in newslist page.

Post by WWWeb »

Thanks for the replay, but how can I pass this code from index.php:

Code: Select all

$stickyRecordsParams = $faq->getStickyRecords();
if (!isset($stickyRecordsParams['error'])) {
    $tpl->processBlock('index', 'stickyRecordsList', array(
        'stickyRecordsUrl'   => $stickyRecordsParams['url'],
		'stickyRecordsContent' => $stickyRecordsParams['content'],
        'stickyRecordsTitle' => $stickyRecordsParams['title'],
		
		)
		
		);
}
How its works? Why index.tpl recoginze sticky template variables when index.php has no processTemplate method?
WWWeb
Posts: 3
Joined: Thu Aug 21, 2014 4:47 pm

Re: Sticky record list in newslist page.

Post by WWWeb »

up
Post Reply