Smarty Forum Index Smarty
The discussions here are for Smarty, a template engine for the PHP programming language.
{config_load} - multilene varible in file.conf

 
Post new topic   Reply to topic    Smarty Forum Index -> General
View previous topic :: View next topic  
Author Message
i-litovan
Smarty Rookie


Joined: 03 Aug 2013
Posts: 13

PostPosted: Sat Sep 21, 2013 12:10 pm    Post subject: {config_load} - multilene varible in file.conf Reply with quote

Hi

How can I declare miltiline varible in the configuration file?

Example:
{config_load file=file.conf}
file.conf

Code:


   #---------------------------------------------------------------
   # Global Varible
   #---------------------------------------------------------------   
   
      pageTitle = "Main Menu"
      bodyBgColor = #000000
       miltiLineVarible = (

              line - 1
                       line - 2
                            line - 3
              ....               

)
      


Thenks...
Back to top
View user's profile Send private message
U.Tews
Administrator


Joined: 22 Nov 2006
Posts: 4631
Location: Hamburg / Germany

PostPosted: Sun Sep 22, 2013 3:50 am    Post subject: Reply with quote

These are defined by tripple qoutes.

Code:
multiline = """ line1
 line2
line3  """


See http://www.smarty.net/docs/en/config.files.tpl
Back to top
View user's profile Send private message
i-litovan
Smarty Rookie


Joined: 03 Aug 2013
Posts: 13

PostPosted: Sun Sep 22, 2013 1:04 pm    Post subject: Reply with quote

U.Tews wrote:
These are defined by tripple qoutes.

Code:
multiline = """ line1
 line2
line3  """


See http://www.smarty.net/docs/en/config.files.tpl


Thanks...
but there was still a question

What is:
Code:

# hidden section
[.Database]
host=my.example.com
db=ADDRESSBOOK
user=php-user
pass=foobar

what does it do?
Back to top
View user's profile Send private message
U.Tews
Administrator


Joined: 22 Nov 2006
Posts: 4631
Location: Hamburg / Germany

PostPosted: Sun Sep 22, 2013 3:27 pm    Post subject: Reply with quote

Config files can have named sections.
Code:

[section1]
...
[section2]
...
[.hidden]
....


at $smarty->configLoad(...) oder {config_load...} you can specifiy a section which shall be loaded. If don't specify a section at load config all sections except hidden sections (name starting with '.') will be loaded.

So hidden sections can only be loaded by specifying it's name at load cnfig.[/code]
Back to top
View user's profile Send private message
i-litovan
Smarty Rookie


Joined: 03 Aug 2013
Posts: 13

PostPosted: Wed Sep 25, 2013 8:06 pm    Post subject: Reply with quote

U.Tews wrote:
Config files can have named sections.
Code:

[section1]
...
[section2]
...
[.hidden]
....


at $smarty->configLoad(...) oder {config_load...} you can specifiy a section which shall be loaded. If don't specify a section at load config all sections except hidden sections (name starting with '.') will be loaded.

So hidden sections can only be loaded by specifying it's name at load cnfig.[/code]


Thanks...
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Smarty Forum Index -> General All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP