We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

How to fetch template

Development and Programming

Dominiq's avatar
Dominiq
18 posts
13 years ago
Dominiq's avatar Dominiq

Hello,

I’m writing module and I have one problem. I don’t know how to fetch template in my module. I don’t want to use {embed} tag in main template. But I want to embed template via PHP.

Example: - my main template

{exp:my_module:auto_embed}

And in PHP I want to:

function auto_embed(){
    // here I want to embed/include other template based on
    // variables that I will include to this function
}
       
Dominiq's avatar
Dominiq
18 posts
13 years ago
Dominiq's avatar Dominiq

I was searching and I did found this:

$this->EE->TMPL->fetch_template('template_group', 'template', TRUE);

If someone else have more info please write for future.

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.