Jump to content

Modal Template


Recommended Posts

Hello,

 

I'm trying to open a simple modal window but seems that something is going wrong as I'm getting a full page inside there.

 

When I want to display a page in client area I'm using:

$ca = new ClientArea();
$ca->initPage();
$ca->assign("profile", $profile);
// Define the template filename to be used without the .tpl extension
$ca->setTemplate('demopage');
// Render Template
$ca->output();

 

But what if I want to show a form without page's header, footer etc? What code do I need to use? I tried to remove $ca->initPage(); but I'm getting error.

 

Thank you

Link to comment
Share on other sites

Temporary I bypass this issue using:

// Load Template Engine
require_once('./vendor/smarty/smarty/libs/Smarty.class.php');
// Prepare Template
$smarty = new Smarty();
$smarty->assign("profile",$profile);
// I'm getting the active template with query
$smarty->display('templates/'.$rlt_template["value"].'/socialblog_author.tpl');

but I'll wait to see if someone can tell me the official way to do it.

 

Thank you

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated