In this board you can talk about general questions about phpMyFAQ
Moderator: Thorsten
-
WWWeb
- Posts: 3
- Joined: Thu Aug 21, 2014 4:47 pm
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:
Post
by Thorsten »
-
WWWeb
- Posts: 3
- Joined: Thu Aug 21, 2014 4:47 pm
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
Post
by WWWeb »
up