Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Options

Advanced Theme Options - Return Theme Option value within themeoptions.php

salumsalum New
edited May 2011 in Vanilla 2.0 - 2.8
I'm developing a theme for vanilla where I'm modifying the themeoptions.php file.

I've been able to do everything so far but can't find a way to retrieve my values. As of now to create a new text field the file uses:

echo $this->Form->TextBox($this->Form->EscapeString('Text_'.$Code));

Which creates a textbox (that returns the value) but uses the name of the field in its parameter. I don't wanna create a field, I just wanna return the value from the database...

Pretty much like... I have the Banner Text field for instance... i'd like to have a function that returns me the value of that option without creating a field... I'll be creating and manipulating the field's value myself... Is there a way to simply retrieve the value of the theme option?

Comments

  • Options
    After looking at the core/class.form.php file in the vanilla files if you guys want to just retrive the falue just do this:

    $var = $this->Form->GetFormValue($this->Form->EscapeString('Text_'.$Code));

    :)
Sign In or Register to comment.