Documentation / Tutorials / Triggers

Create site settings

/ Triggers / Create site settings

We can use site options to generat universal fields which we are using in our website eg. Site logo, favicon icon

We have to write the code as below and trigger it as Site options.

[aw2.register site_option part=start]
{
      "title"            :"Site Logo's",
      "id"               :"site-logos-settings",
      "show_names"       :true,
      "show_on"          :{ "key": "options-page", "value": [ "site-logos-settings" ] }
}
[/aw2.register]

[aw2.register site_option part=field]
{
        "id"		:"opt-logo",
	"type"	  	:"file",
	"name"	  	:"Main Logo",
	"subtitle"	:"Basic media uploader with disabled URL input field.",
	"desc"	  	:"Basic media uploader with disabled URL input field.",
	"options"   :{"url":false}
}
[/aw2.register]

[aw2.register site_option part=field]
{
        "id"		:"opt-favicon",
	"type"	  	:"file",
	"name"	  	:"Site Favicon",
	"subtitle"	:"Basic media uploader with disabled URL input field.",
	"desc"	  	:"Basic media uploader with disabled URL input field.",
	"options"   :{"url":false}
}
[/aw2.register]

 

 

Categories
Most Popular