1
hipoonios
Show blocks on a a custom page is it possible?
  • 2009/5/14 18:36

  • hipoonios

  • Friend of XOOPS

  • Posts: 298

  • Since: 2005/9/24


I have created a custom page with the following code:

if (file_exists("mainfile.php")) {
    include(
"mainfile.php");
}
elseif(
file_exists("../mainfile.php")) {
    include(
"../mainfile.php");
}
else {
    include(
"../../mainfile.php");
}
include(
XOOPS_ROOT_PATH "/header.php");
$xoopsTpl->assign('xoops_showrblock'1); // display right blocks
$xoopsTpl->assign('xoops_showlblock'0); // display right blocks 
?>

my html content here


include(XOOPS_ROOT_PATH "/footer.php");
?>


Now I want a block on this page. Is it possible? I tried to add $xoopsTpl->assign('xoops_showrblock', 113) (my block id) to the code but it doesnt work.

I know there is a plugin released called blocks everywhere. But this doesnt work here. Only from themes.
I love Xoops!

2
trabis
Re: Show blocks on a a custom page is it possible?
  • 2009/5/14 20:11

  • trabis

  • Core Developer

  • Posts: 2269

  • Since: 2006/9/1 1


Try this (but also using smarty plugin)
include_once XOOPS_ROOT_PATH '/class/smarty/xoops_plugins/function.block.php';
$params['id'] = 1;
smarty_function_block($params$xoopsTpl);


I don't know why, but it works, lol

3
hipoonios
Re: Show blocks on a a custom page is it possible?
  • 2009/5/15 19:34

  • hipoonios

  • Friend of XOOPS

  • Posts: 298

  • Since: 2005/9/24


Thank you trabis. You are always helpful.
I love Xoops!

Login

Who's Online

404 user(s) are online (273 user(s) are browsing Support Forums)


Members: 0


Guests: 404


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits