Hi, I'm trying to get the top 10 and most recent five faq lists to load within the main.tpl template, but they won't show.
See: http://support.silvermead.co.uk/
You can see at the bottom I have included them in the index.tpl and they come through perfectly.
Do I need to change somehting somewhere for writeTopTenRow and writeNewestRow to be parsed from within main.tpl please?
Thank you very much for any help in advance!
Calling {writeTopTenRow} from within main.tpl
Moderator: Thorsten
-
- Posts: 4
- Joined: Thu Aug 25, 2005 3:32 pm
Hi,
you have to add the following code in main.php:
bye
Thorsten
you have to add the following code in main.php:
Code: Select all
'writeTopTenHeader' => $PMF_LANG['msgTopTen'],
'writeTopTenRow' => generateTopTen(),
'writeNewestHeader' => $PMF_LANG['msgLatestArticles'],
'writeNewestRow' => generateFiveNewest(),
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist
-
- Posts: 4
- Joined: Thu Aug 25, 2005 3:32 pm
I think I might have entered that wrong, now no content is loading: http://support.silvermead.co.uk
My main.php looks like:
<?php
/**
* $Id: main.php,v 1.2.2.1 2005/08/13 18:15:43 thorstenr Exp $
*
* @author Thorsten Rinne <thorsten@phpmyfaq.de>
* @since 2002-08-23
* @copyright (c) 2001-2005 phpMyFAQ Team
*
* The contents of this file are subject to the Mozilla Public License
* Version 1.1 (the 'License'); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an 'AS IS'
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
* License for the specific language governing rights and limitations
* under the License.
*/
$tpl->processTemplate ('writeContent', array(
'writeNewsHeader' => $PMF_CONF['title'].$PMF_LANG['msgNews'],
'writeNews' => generateNews(),
'writeNumberOfArticles' => $PMF_LANG['msgHomeThereAre'].generateNumberOfArticles().$PMF_LANG['msgHomeArticlesOnline'])),
'writeTopTenHeader' => $PMF_LANG['msgTopTen'],
'writeTopTenRow' => generateTopTen(),
'writeNewestHeader' => $PMF_LANG['msgLatestArticles'],
'writeNewestRow' => generateFiveNewest();
$tpl->includeTemplate('writeContent', 'index');
?>
My main.php looks like:
<?php
/**
* $Id: main.php,v 1.2.2.1 2005/08/13 18:15:43 thorstenr Exp $
*
* @author Thorsten Rinne <thorsten@phpmyfaq.de>
* @since 2002-08-23
* @copyright (c) 2001-2005 phpMyFAQ Team
*
* The contents of this file are subject to the Mozilla Public License
* Version 1.1 (the 'License'); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an 'AS IS'
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
* License for the specific language governing rights and limitations
* under the License.
*/
$tpl->processTemplate ('writeContent', array(
'writeNewsHeader' => $PMF_CONF['title'].$PMF_LANG['msgNews'],
'writeNews' => generateNews(),
'writeNumberOfArticles' => $PMF_LANG['msgHomeThereAre'].generateNumberOfArticles().$PMF_LANG['msgHomeArticlesOnline'])),
'writeTopTenHeader' => $PMF_LANG['msgTopTen'],
'writeTopTenRow' => generateTopTen(),
'writeNewestHeader' => $PMF_LANG['msgLatestArticles'],
'writeNewestRow' => generateFiveNewest();
$tpl->includeTemplate('writeContent', 'index');
?>
Hi,
the file has to look like th following:
bye
Thorsten
the file has to look like th following:
Code: Select all
<?php
/**
* $Id: main.php,v 1.2.2.1 2005/08/13 18:15:43 thorstenr Exp $
*
* @author Thorsten Rinne <thorsten@phpmyfaq.de>
* @since 2002-08-23
* @copyright (c) 2001-2005 phpMyFAQ Team
*
* The contents of this file are subject to the Mozilla Public License
* Version 1.1 (the 'License'); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an 'AS IS'
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
* License for the specific language governing rights and limitations
* under the License.
*/
$tpl->processTemplate ('writeContent', array(
'writeNewsHeader' => $PMF_CONF['title'].$PMF_LANG['msgNews'],
'writeNews' => generateNews(),
'writeNumberOfArticles' => $PMF_LANG['msgHomeThereAre'].generateNumberOfArticles().$PMF_LANG['msgHomeArticlesOnline'],
'writeTopTenHeader' => $PMF_LANG['msgTopTen'],
'writeTopTenRow' => generateTopTen(),
'writeNewestHeader' => $PMF_LANG['msgLatestArticles'],
'writeNewestRow' => generateFiveNewest());
$tpl->includeTemplate('writeContent', 'index');
?>
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist
-
- Posts: 4
- Joined: Thu Aug 25, 2005 3:32 pm
I'm really sorry but it still has a problem with that file - line 27 but I can't see anything wrong.
http://support.silvermead.co.uk/
Thank you so much for your help.
http://support.silvermead.co.uk/
Thank you so much for your help.
Hi,
sorry for the bug... here's the corrected file:
bye
Thorsten
sorry for the bug... here's the corrected file:
Code: Select all
<?php
/**
* $Id: main.php,v 1.2.2.1 2005/08/13 18:15:43 thorstenr Exp $
*
* @author Thorsten Rinne <thorsten@phpmyfaq.de>
* @since 2002-08-23
* @copyright (c) 2001-2005 phpMyFAQ Team
*
* The contents of this file are subject to the Mozilla Public License
* Version 1.1 (the 'License'); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an 'AS IS'
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
* License for the specific language governing rights and limitations
* under the License.
*/
$tpl->processTemplate ('writeContent', array(
'writeNewsHeader' => $PMF_CONF['title'].$PMF_LANG['msgNews'],
'writeNews' => generateNews(),
'writeNumberOfArticles' => $PMF_LANG['msgHomeThereAre'].generateNumberOfArticles().$PMF_LANG['msgHomeArticlesOnline'],
'writeTopTenHeader' => $PMF_LANG['msgTopTen'],
'writeTopTenRow' => generateTopTen(),
'writeNewestHeader' => $PMF_LANG['msgLatestArticles'],
'writeNewestRow' => generateFiveNewest()));
$tpl->includeTemplate('writeContent', 'index');
?>
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist
-
- Posts: 4
- Joined: Thu Aug 25, 2005 3:32 pm