e107help.org Q&A
0 like 0 dislike
Hello. Is it possible to include html code in a function config() in the theme_config.php file ?
e107 version 2.1.5
asked in Themes by (9 points) 1 2 4

2 Answers

1 like 0 dislike
Not enough information.

theme_config.php is for theme preferencies, fields are in $fields variable.

Generally, it's php file, so if you want, you need insert html code :

- with echo function  or

- to variable f.e $text and return its value.  

Normally you can use type method for any field and write method where you can use html code (with above ways), but I can't image why this is needed in theme_config.php.
answered by (1.3k points) 7 52 62
0 like 0 dislike
Hi. I want to add more options. $text  or echo dosn't work. In ' function help() ' we can use html code

but in ' function config() ' no.
answered by (9 points) 1 2 4
Maybe because it's not function but method in class (something with OOP).  And it uses new way of creating forms (admin_ui functionality). You can try to use type method for some field and write method for it, but I am really not sure if this can be used in theme preferencies. They are just fields, text, bbarea, anything but you need to set them correct way.   Each field can help help value when you can use html code.  

I still don't know what code you want to use there, but theme preferencies are for setting values, so they are just only form elements.  It's a type of form, nothing more.
Welcome to e107 Q&A, where you can ask questions and receive answers from other members of the e107 community.
744 questions
1,154 answers
1,179 users