Jump to content

config_load smarty?


CrustyDOD

Recommended Posts

Hey

 

Somehow config_load is not working..

 

conf file:

# info url
infoUrl = "http://test.com"

 

header.tpl

{config_load file="templates/default/includeme.conf"}
{#infoUrl#}

 

Result = nothing..

 

Even debug says nothing was loaded.. eh?

Anyone sees a mistake?

Link to comment
Share on other sites

  • 1 year later...

So I have a work around. Which is basically to write variables to a .txt file from my admin addon instead and use the {php} {/php} tags within header.tpl something like below.

 

{php}

$filename = "templates/mytemplatename/systemstate.txt";

$handle = fopen($filename, "r");

$contents = fread($handle, filesize($filename));

fclose($handle);

$this->assign('systemstateid',$contents);

{/php}

 

So, this works for now seeing as I only have one variable I want to retrieve in this file.

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