Jump to content

Retrieve variable issue - Example Plugin

Recommended Posts


I am newbie IPS developer.

I create a Plugin with Developer tool in my IPS installation.

I have in my plugin the method

	public function configuration( &$form=null )
 		if ( $form === null )
	 		$form = new \IPS\Helpers\Form;
    $form->add( new \IPS\Helpers\Form\Text( 'example_var_1', isset( $this->configuration['example_var_1'] ) ? $this->configuration['example_var_1'] : '', FALSE) );
    return $form;
 		// $$form->add( new \IPS\Helpers\Form\XXXX( .... ) );
 		// return $form;

I have in render method

public function render()
	$this->configuration['example_var_1'] 			= isset($this->configuration['example_var_1']) ?$this->configuration['example_var_1']: '';

	return $this->output( $this->configuration['example_var_1']);
	// Use $this->output( $foo, $bar ); to return a string generated by the template set in init() or manually added via $widget->template( $callback );
	// Note you MUST route output through $this->output() rather than calling \IPS\Theme::i()->getTemplate() because of the way widgets are cached


How I could retrieve variable example_var_1 in myplugin.phtml file ?



Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...