XF 2.2 Saving Admin Settings?

TheRageIsOn

Member
Hey there,
i have an issue about saving admin settings to be able to use in my templates.

Its something like this:
Code:
    <xf:form action="{{ link('images/folders/save') }}" class="block" ajax="true">
    <div class="block-container">
        <div class="block-body">
            <xf:inforow>Manage</xf:inforow>
            <xf:textboxrow name="imageServer" value="{$xf.options.imageServer}" maxlength="100" label="Enter the Image server URL here" />
            <xf:submitrow sticky="true" icon="save" />
        </div>
    </div>
    </xf:form>]]>

Additional i have the options.xml like this:
Code:
  <option option_id="imageServer" edit_format="textbox" data_type="string" advanced="0">
    <default_value></default_value>
    <edit_format_params>rows=5</edit_format_params>
    <relation group_id="images" display_order="1110"/>
  </option>

I want to use that setting in templates as listed above like $xf.options.imageServer.
but when i press save nothing gets save
How do i handle that data in my Folders.php controller ?
public function actionSave(ParameterBag $params)
{
$this->assertPostOnly();
$options = \XF::eek:ptions();
if ($params->imageServer)
{
print "Server:".$params->imageServer;
}
echo"saved or not?";
....other code here
}

What am i missing?

Regards Mike
 

JRobert

Active member
Can you share your solution for others who may find this thread?

Not related to this specific question, but I often search this forum for answers (many of my questions have been asked before), and it is frustrating to find a question with a "never mind, I solved it" answer without details.
 
Top