<?xml version="1.0" encoding="utf-8"?>
<!-- generator="ThemeXpert" -->
<?xml-stylesheet href="https://www.themexpert.com/media/quixnxt/css/quix-core.css?ver=4.5.4" type="text/css"?>
<feed xmlns="https://www.w3.org/2005/Atom"  xml:lang="en-gb">
	<title type="text">WordPress &amp; Joomla Documentation - ThemeXpert</title>
	<subtitle type="text">ThemeXpert: Joomla's oldest and most trusted template and extension club since 2010 with the best page builder, Quix.</subtitle>
	<link rel="alternate" type="text/html" href="https://www.themexpert.com"/>
	<id>https://www.themexpert.com/docs/quix/developers</id>
	<updated>2024-08-09T15:28:02+06:00</updated>
	<author>
		<name>ThemeXpert</name>
		<email>support@themexpert.com</email>
	</author>
	<generator>ThemeXpert</generator>
	<link rel="self" type="application/atom+xml" href="https://www.themexpert.com/docs/quix/developers?format=feed&amp;type=atom"/>
	<entry>
		<title>Custom Element Path</title>
		<link rel="alternate" type="text/html" href="https://www.themexpert.com/docs/quix/developers/custom-element-path"/>
		<published>2016-05-18T16:59:11+06:00</published>
		<updated>2016-05-18T16:59:11+06:00</updated>
		<id>https://www.themexpert.com/docs/quix/developers/custom-element-path</id>
		<author>
			<name>Parvez Akther</name>
			<email>parvez@themexpert.com</email>
		</author>
		<summary type="html">&lt;p&gt;Extension developers can create elements for their extension direct inside the extension folder. By default, Quix listen its own elements folder and active template's folder.&lt;/p&gt;
&lt;h2&gt;Register Element Path&lt;/h2&gt;
&lt;pre&gt;&lt;code&gt;if ( file_exists( JPATH_LIBRARY . &quot;/quix/app/bootstrap.php&quot; ) ) {
    quix()-&amp;gt;getElementsBag()-&amp;gt;fill( YOUR_EXTENSION_PATH . &quot;/elements&quot;, YOUR_EXTENSION_URL . &quot;/elements&quot; );
}&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;You have to provide your extension's element path and url. Replace &lt;code&gt;YOUR_EXTENSION_PATH&lt;/code&gt; with extension's file path and &lt;code&gt;YOUR_EXTENSION_URL&lt;/code&gt; with extension's url.&lt;/p&gt;</summary>
		<content type="html">&lt;p&gt;Extension developers can create elements for their extension direct inside the extension folder. By default, Quix listen its own elements folder and active template's folder.&lt;/p&gt;
&lt;h2&gt;Register Element Path&lt;/h2&gt;
&lt;pre&gt;&lt;code&gt;if ( file_exists( JPATH_LIBRARY . &quot;/quix/app/bootstrap.php&quot; ) ) {
    quix()-&amp;gt;getElementsBag()-&amp;gt;fill( YOUR_EXTENSION_PATH . &quot;/elements&quot;, YOUR_EXTENSION_URL . &quot;/elements&quot; );
}&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;You have to provide your extension's element path and url. Replace &lt;code&gt;YOUR_EXTENSION_PATH&lt;/code&gt; with extension's file path and &lt;code&gt;YOUR_EXTENSION_URL&lt;/code&gt; with extension's url.&lt;/p&gt;</content>
		<category term="Developers" />
	</entry>
	<entry>
		<title>How To Disable Elements</title>
		<link rel="alternate" type="text/html" href="https://www.themexpert.com/docs/quix/developers/disable-elements"/>
		<published>2016-05-18T16:46:50+06:00</published>
		<updated>2016-05-18T16:46:50+06:00</updated>
		<id>https://www.themexpert.com/docs/quix/developers/disable-elements</id>
		<author>
			<name>Parvez Akther</name>
			<email>parvez@themexpert.com</email>
		</author>
		<summary type="html">&lt;p&gt;Sometimes you need to disable few core elements from your template or extensions. Create a file name &lt;code&gt;quix.php&lt;/code&gt; inside &lt;code&gt;templates/YOUR_TEMPLATE/quix&lt;/code&gt; directory and use this code below to disable any elements you want.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;?php
    quix()-&amp;gt;disableElements(['button', 'image']);&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Provide element &lt;strong&gt;slug&lt;/strong&gt; in &lt;code&gt;disableElements&lt;/code&gt; function. Replace &lt;code&gt;YOUR_TEMPLATE&lt;/code&gt; with your current active template name.&lt;/p&gt;
&lt;blockquote&gt;
&lt;blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;User can always enable any of your disabled element from &lt;strong&gt;Element Manager&lt;/strong&gt;. If you disable an element that already used on some pages, the element will work as it is. It will only effect when someone try to add a new element. &lt;/p&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;If you disable any elements from template/extensions that already enabled/disabled by user before, &lt;code&gt;disableElements&lt;/code&gt; will not have any effect on that elements.&lt;/strong&gt;&lt;/p&gt;</summary>
		<content type="html">&lt;p&gt;Sometimes you need to disable few core elements from your template or extensions. Create a file name &lt;code&gt;quix.php&lt;/code&gt; inside &lt;code&gt;templates/YOUR_TEMPLATE/quix&lt;/code&gt; directory and use this code below to disable any elements you want.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;?php
    quix()-&amp;gt;disableElements(['button', 'image']);&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Provide element &lt;strong&gt;slug&lt;/strong&gt; in &lt;code&gt;disableElements&lt;/code&gt; function. Replace &lt;code&gt;YOUR_TEMPLATE&lt;/code&gt; with your current active template name.&lt;/p&gt;
&lt;blockquote&gt;
&lt;blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;User can always enable any of your disabled element from &lt;strong&gt;Element Manager&lt;/strong&gt;. If you disable an element that already used on some pages, the element will work as it is. It will only effect when someone try to add a new element. &lt;/p&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;If you disable any elements from template/extensions that already enabled/disabled by user before, &lt;code&gt;disableElements&lt;/code&gt; will not have any effect on that elements.&lt;/strong&gt;&lt;/p&gt;</content>
		<category term="Developers" />
	</entry>
	<entry>
		<title>How to Load CSS / JS in Element</title>
		<link rel="alternate" type="text/html" href="https://www.themexpert.com/docs/quix/developers/load-css-js"/>
		<published>2016-05-18T13:42:32+06:00</published>
		<updated>2016-05-18T13:42:32+06:00</updated>
		<id>https://www.themexpert.com/docs/quix/developers/load-css-js</id>
		<author>
			<name>Parvez Akther</name>
			<email>parvez@themexpert.com</email>
		</author>
		<summary type="html">&lt;p&gt;A new Asset Manager introduced in &lt;strong&gt;Quix 1.1.0&lt;/strong&gt; to unify the interface throughout Quix for adding and managing CSS and JavaScript. Asset Manager simplify the process of adding JavaScript and/or CSS from your elements view file.&lt;/p&gt;
&lt;p&gt;The Asset Manager is just a class that is available throughout Quix files. There are 2 paths already registered as global constant so you can quickly resolve the path from your elements.&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Constant&lt;/th&gt;
&lt;th&gt;Resolved Path&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;QUIX_URL&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;/libraries/quix&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;QUIX_TEMPLATE_URL&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;/templates/YOUR_TEMPLATE/quix&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h2&gt;Adding Css&lt;/h2&gt;
&lt;pre&gt;&lt;code&gt;Assets::Css ( string $handle, string $src = false, int $order, string|bool|null $ver = false )&lt;/code&gt;&lt;/pre&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Parameters&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;$handle&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;(string) (Required) Name of the script. Should be unique. You can also pass $slug as its unqiue for every element&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;$src&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;URL of the script, eg: &lt;code&gt;QUIX_URL.&quot;/assets/css/style.css&quot;&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;$order&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;(int) (Optional) Specifying assets order, if it has one, asset will load on specified order or default order.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;$ver&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;(string or bool or null) (Optional) String specifying script version number, if it has one, which is added to the URL as a query string for cache busting purposes. If version is set to false, a version number is automatically added equal to current installed Quix version. If set to null, no version is added.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&lt;strong&gt;Example&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Assets::Css($slug, QUIX_TEMPLATE_URL.&quot;/elements/MY_ELEMENT/css/style.css&quot;, 12);&lt;/code&gt;&lt;/pre&gt;
&lt;blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;Replace &lt;code&gt;MY_ELEMENT&lt;/code&gt; with your element folder name. By defining 12 you are telling Quix to load this assets to 12 number position. If total assets is less than provided order value, it will load end of the asset.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Adding InlineCss&lt;/h2&gt;
&lt;p&gt;Create &lt;code&gt;style.php&lt;/code&gt; file insdie your element folder and you can write css code here. All css code will injected to your html header.&lt;/p&gt;
&lt;p&gt;Beauty of this approach is, you can write conditional css with php and all the element fields available on this file.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Example&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;?php if($field['title]):?&amp;gt;
#&amp;lt;?php echo $id?&amp;gt; .qx-title{ color: red; }
&amp;lt;?php endif?&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;In this example, we checked if there anything in title field. If yes, we added title color. We can make it more dynamic like this :&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;?php if($field['title]):?&amp;gt;
#&amp;lt;?php echo $id?&amp;gt; .qx-title{ &amp;lt;?php Css::prop('color', $field['title_color']);?&amp;gt; }
&amp;lt;?php endif?&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Adding Javascript&lt;/h2&gt;
&lt;pre&gt;&lt;code&gt;Assets::Js ( string $handle, string $src = false, array $deps = array(), int $order, string|bool|null $ver = false )&lt;/code&gt;&lt;/pre&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Parameters&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;$handle&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;(string) (Required) Name of the script. Should be unique. You can also pass $slug as its unqiue for every element&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;$src&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;URL of the script, eg: &lt;code&gt;QUIX_URL.&quot;/assets/css/style.css&quot;&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;$deps&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;(array) (Optional) An array of registered script handles this script depends on.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;$order&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;(int) (Optional) Specifying assets order, if it has one, asset will load on specified order or default order.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;$ver&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;(string or bool or null) (Optional) String specifying script version number, if it has one, which is added to the URL as a query string for cache busting purposes. If version is set to false, a version number is automatically added equal to current installed Quix version. If set to null, no version is added.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&lt;strong&gt;Example&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Assets::Js($slug, QUIX_TEMPLATE_URL.&quot;/elements/MY_ELEMENT/js/script.js&quot;, array('jQuery'), 12);&lt;/code&gt;&lt;/pre&gt;
&lt;blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;Replace &lt;code&gt;MY_ELEMENT&lt;/code&gt; with your element folder name. By defining 12 you are telling Quix to load this assets to 12 number position. If total assets is less than provided order value, it will load end of the asset.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Adding Inline Javascript&lt;/h2&gt;
&lt;p&gt;Create another &lt;code&gt;php&lt;/code&gt; file inside your element folder and call it line any other javascript file.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Assets::Js( QUIX_TEMPLATE_URL . '/elements/MY_ELEMENT/inline-js.php');&lt;/code&gt;&lt;/pre&gt;
&lt;blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;If you add &lt;code&gt;php&lt;/code&gt; file using &lt;code&gt;Assets::Js()&lt;/code&gt; it will automatically add in your html header. There are several benefits of this approach. You can pass any &lt;code&gt;php&lt;/code&gt; value in your &lt;code&gt;js&lt;/code&gt; file.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Example&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Assets::Js( QUIX_TEMPLATE_URL . '/elements/MY_ELEMENT/inline-js.php', compact(['id']));&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;inline-js.php file&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;jQuery(document).ready(function(){
  jQuery(&quot;#&amp;lt;?php echo $id?&amp;gt;&quot;).css('width', 20);
});&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;In this example, we passed &lt;code&gt;id&lt;/code&gt; from our &lt;code&gt;view&lt;/code&gt; file(You can pass any php variable) and used it in your js file&lt;/p&gt;</summary>
		<content type="html">&lt;p&gt;A new Asset Manager introduced in &lt;strong&gt;Quix 1.1.0&lt;/strong&gt; to unify the interface throughout Quix for adding and managing CSS and JavaScript. Asset Manager simplify the process of adding JavaScript and/or CSS from your elements view file.&lt;/p&gt;
&lt;p&gt;The Asset Manager is just a class that is available throughout Quix files. There are 2 paths already registered as global constant so you can quickly resolve the path from your elements.&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Constant&lt;/th&gt;
&lt;th&gt;Resolved Path&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;QUIX_URL&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;/libraries/quix&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;QUIX_TEMPLATE_URL&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;/templates/YOUR_TEMPLATE/quix&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h2&gt;Adding Css&lt;/h2&gt;
&lt;pre&gt;&lt;code&gt;Assets::Css ( string $handle, string $src = false, int $order, string|bool|null $ver = false )&lt;/code&gt;&lt;/pre&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Parameters&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;$handle&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;(string) (Required) Name of the script. Should be unique. You can also pass $slug as its unqiue for every element&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;$src&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;URL of the script, eg: &lt;code&gt;QUIX_URL.&quot;/assets/css/style.css&quot;&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;$order&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;(int) (Optional) Specifying assets order, if it has one, asset will load on specified order or default order.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;$ver&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;(string or bool or null) (Optional) String specifying script version number, if it has one, which is added to the URL as a query string for cache busting purposes. If version is set to false, a version number is automatically added equal to current installed Quix version. If set to null, no version is added.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&lt;strong&gt;Example&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Assets::Css($slug, QUIX_TEMPLATE_URL.&quot;/elements/MY_ELEMENT/css/style.css&quot;, 12);&lt;/code&gt;&lt;/pre&gt;
&lt;blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;Replace &lt;code&gt;MY_ELEMENT&lt;/code&gt; with your element folder name. By defining 12 you are telling Quix to load this assets to 12 number position. If total assets is less than provided order value, it will load end of the asset.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Adding InlineCss&lt;/h2&gt;
&lt;p&gt;Create &lt;code&gt;style.php&lt;/code&gt; file insdie your element folder and you can write css code here. All css code will injected to your html header.&lt;/p&gt;
&lt;p&gt;Beauty of this approach is, you can write conditional css with php and all the element fields available on this file.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Example&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;?php if($field['title]):?&amp;gt;
#&amp;lt;?php echo $id?&amp;gt; .qx-title{ color: red; }
&amp;lt;?php endif?&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;In this example, we checked if there anything in title field. If yes, we added title color. We can make it more dynamic like this :&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;?php if($field['title]):?&amp;gt;
#&amp;lt;?php echo $id?&amp;gt; .qx-title{ &amp;lt;?php Css::prop('color', $field['title_color']);?&amp;gt; }
&amp;lt;?php endif?&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Adding Javascript&lt;/h2&gt;
&lt;pre&gt;&lt;code&gt;Assets::Js ( string $handle, string $src = false, array $deps = array(), int $order, string|bool|null $ver = false )&lt;/code&gt;&lt;/pre&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Parameters&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;$handle&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;(string) (Required) Name of the script. Should be unique. You can also pass $slug as its unqiue for every element&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;$src&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;URL of the script, eg: &lt;code&gt;QUIX_URL.&quot;/assets/css/style.css&quot;&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;$deps&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;(array) (Optional) An array of registered script handles this script depends on.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;$order&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;(int) (Optional) Specifying assets order, if it has one, asset will load on specified order or default order.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;$ver&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;(string or bool or null) (Optional) String specifying script version number, if it has one, which is added to the URL as a query string for cache busting purposes. If version is set to false, a version number is automatically added equal to current installed Quix version. If set to null, no version is added.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&lt;strong&gt;Example&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Assets::Js($slug, QUIX_TEMPLATE_URL.&quot;/elements/MY_ELEMENT/js/script.js&quot;, array('jQuery'), 12);&lt;/code&gt;&lt;/pre&gt;
&lt;blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;Replace &lt;code&gt;MY_ELEMENT&lt;/code&gt; with your element folder name. By defining 12 you are telling Quix to load this assets to 12 number position. If total assets is less than provided order value, it will load end of the asset.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Adding Inline Javascript&lt;/h2&gt;
&lt;p&gt;Create another &lt;code&gt;php&lt;/code&gt; file inside your element folder and call it line any other javascript file.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Assets::Js( QUIX_TEMPLATE_URL . '/elements/MY_ELEMENT/inline-js.php');&lt;/code&gt;&lt;/pre&gt;
&lt;blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;If you add &lt;code&gt;php&lt;/code&gt; file using &lt;code&gt;Assets::Js()&lt;/code&gt; it will automatically add in your html header. There are several benefits of this approach. You can pass any &lt;code&gt;php&lt;/code&gt; value in your &lt;code&gt;js&lt;/code&gt; file.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Example&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Assets::Js( QUIX_TEMPLATE_URL . '/elements/MY_ELEMENT/inline-js.php', compact(['id']));&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;inline-js.php file&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;jQuery(document).ready(function(){
  jQuery(&quot;#&amp;lt;?php echo $id?&amp;gt;&quot;).css('width', 20);
});&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;In this example, we passed &lt;code&gt;id&lt;/code&gt; from our &lt;code&gt;view&lt;/code&gt; file(You can pass any php variable) and used it in your js file&lt;/p&gt;</content>
		<category term="Developers" />
	</entry>
	<entry>
		<title>Understanding YAML</title>
		<link rel="alternate" type="text/html" href="https://www.themexpert.com/docs/quix/developers/understanding-yaml"/>
		<published>2016-05-09T10:03:55+06:00</published>
		<updated>2016-05-09T10:03:55+06:00</updated>
		<id>https://www.themexpert.com/docs/quix/developers/understanding-yaml</id>
		<author>
			<name>Parvez Akther</name>
			<email>parvez@themexpert.com</email>
		</author>
		<summary type="html">&lt;p&gt;According to the official &lt;a href=&quot;https://yaml.org/&quot;&gt;YAML&lt;/a&gt; website, YAML is &amp;quot;a human friendly data
serialization standard for all programming languages&amp;quot;.&lt;/p&gt;
&lt;p&gt;Even if the YAML format can describe complex nested data structure, this
chapter only describes the minimum set of features needed to use YAML as a
configuration file format.&lt;/p&gt;
&lt;p&gt;YAML is a simple language that describes data. As PHP, it has a syntax for
simple types like strings, booleans, floats, or integers. But unlike PHP, it
makes a difference between arrays (sequences) and hashes (mappings).&lt;/p&gt;
&lt;h3&gt;Scalars&lt;/h3&gt;
&lt;p&gt;The syntax for scalars is similar to the PHP syntax.&lt;/p&gt;
&lt;h3&gt;Strings&lt;/h3&gt;
&lt;p&gt;Strings in YAML can be wrapped both in single and double quotes. In some cases,
they can also be unquoted:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-yaml&quot;&gt;A string in YAML

'A singled-quoted string in YAML'

&quot;A double-quoted string in YAML&quot;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Quoted styles are useful when a string starts or end with one or more relevant
spaces, because unquoted strings are trimmed on both end when parsing their
contents. Quotes are required when the string contains special or reserved characters.&lt;/p&gt;
&lt;p&gt;When using single-quoted strings, any single quote &lt;code&gt;'&lt;/code&gt; inside its contents
must be doubled to escape it:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-yaml&quot;&gt;'A single quote '' inside a single-quoted string'&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Strings containing any of the following characters must be quoted. Although you
can use double quotes, for these characters it is more convenient to use single
quotes, which avoids having to escape any backslash &lt;code&gt;\&lt;/code&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;:&lt;/code&gt;, &lt;code&gt;{&lt;/code&gt;, &lt;code&gt;}&lt;/code&gt;, &lt;code&gt;[&lt;/code&gt;, &lt;code&gt;]&lt;/code&gt;, &lt;code&gt;,&lt;/code&gt;, &lt;code&gt;&amp;amp;&lt;/code&gt;, &lt;code&gt;*&lt;/code&gt;, &lt;code&gt;#&lt;/code&gt;, &lt;code&gt;?&lt;/code&gt;, &lt;code&gt;|&lt;/code&gt;,
&lt;code&gt;-&lt;/code&gt;, &lt;code&gt;&amp;lt;&lt;/code&gt;, &lt;code&gt;&amp;gt;&lt;/code&gt;, &lt;code&gt;=&lt;/code&gt;, &lt;code&gt;!&lt;/code&gt;, &lt;code&gt;%&lt;/code&gt;, &lt;code&gt;@&lt;/code&gt;, &lt;code&gt;\&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The double-quoted style provides a way to express arbitrary strings, by
using &lt;code&gt;\&lt;/code&gt; to escape characters and sequences. For instance, it is very useful
when you need to embed a &lt;code&gt;\n&lt;/code&gt; or a Unicode character in a string.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-yaml&quot;&gt;&quot;A double-quoted string in YAML\n&quot;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;If the string contains any of the following control characters, it must be
escaped with double quotes:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;\0&lt;/code&gt;, &lt;code&gt;\x01&lt;/code&gt;, &lt;code&gt;\x02&lt;/code&gt;, &lt;code&gt;\x03&lt;/code&gt;, &lt;code&gt;\x04&lt;/code&gt;, &lt;code&gt;\x05&lt;/code&gt;, &lt;code&gt;\x06&lt;/code&gt;, &lt;code&gt;\a&lt;/code&gt;,
&lt;code&gt;\b&lt;/code&gt;, &lt;code&gt;\t&lt;/code&gt;, &lt;code&gt;\n&lt;/code&gt;, &lt;code&gt;\v&lt;/code&gt;, &lt;code&gt;\f&lt;/code&gt;, &lt;code&gt;\r&lt;/code&gt;, &lt;code&gt;\x0e&lt;/code&gt;, &lt;code&gt;\x0f&lt;/code&gt;, &lt;code&gt;\x10&lt;/code&gt;,
&lt;code&gt;\x11&lt;/code&gt;, &lt;code&gt;\x12&lt;/code&gt;, &lt;code&gt;\x13&lt;/code&gt;, &lt;code&gt;\x14&lt;/code&gt;, &lt;code&gt;\x15&lt;/code&gt;, &lt;code&gt;\x16&lt;/code&gt;, &lt;code&gt;\x17&lt;/code&gt;, &lt;code&gt;\x18&lt;/code&gt;,
&lt;code&gt;\x19&lt;/code&gt;, &lt;code&gt;\x1a&lt;/code&gt;, &lt;code&gt;\e&lt;/code&gt;, &lt;code&gt;\x1c&lt;/code&gt;, &lt;code&gt;\x1d&lt;/code&gt;, &lt;code&gt;\x1e&lt;/code&gt;, &lt;code&gt;\x1f&lt;/code&gt;, &lt;code&gt;\N&lt;/code&gt;,
&lt;code&gt;\_&lt;/code&gt;, &lt;code&gt;\L&lt;/code&gt;, &lt;code&gt;\P&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Finally, there are other cases when the strings must be quoted, no matter if
you're using single or double quotes:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;When the string is &lt;code&gt;true&lt;/code&gt; or &lt;code&gt;false&lt;/code&gt; (otherwise, it would be treated as a
boolean value);&lt;/li&gt;
&lt;li&gt;When the string is &lt;code&gt;null&lt;/code&gt; or &lt;code&gt;~&lt;/code&gt; (otherwise, it would be considered as a
&lt;code&gt;null&lt;/code&gt; value);&lt;/li&gt;
&lt;li&gt;When the string looks like a number, such as integers (e.g. &lt;code&gt;2&lt;/code&gt;, &lt;code&gt;14&lt;/code&gt;, etc.),
floats (e.g. &lt;code&gt;2.6&lt;/code&gt;, &lt;code&gt;14.9&lt;/code&gt;) and exponential numbers (e.g. &lt;code&gt;12e7&lt;/code&gt;, etc.)
(otherwise, it would be treated as a numeric value);&lt;/li&gt;
&lt;li&gt;When the string looks like a date (e.g. &lt;code&gt;2014-12-31&lt;/code&gt;) (otherwise it would be
automatically converted into a Unix timestamp).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;When a string contains line breaks, you can use the literal style, indicated
by the pipe (&lt;code&gt;|&lt;/code&gt;), to indicate that the string will span several lines. In
literals, newlines are preserved:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-yaml&quot;&gt;|
  \/ /| |\/| |
  / / | |  | |__&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Alternatively, strings can be written with the folded style, denoted by &lt;code&gt;&amp;gt;&lt;/code&gt;,
where each line break is replaced by a space:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-yaml&quot;&gt;&amp;gt;
This is a very long sentence
that spans several lines in the YAML
but which will be rendered as a string
without carriage returns.&lt;/code&gt;&lt;/pre&gt;
&lt;blockquote&gt;
&lt;blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;Notice the two spaces before each line in the previous examples. They won't appear in the resulting PHP strings.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;h3&gt;Numbers&lt;/h3&gt;
&lt;pre&gt;&lt;code class=&quot;language-yaml&quot;&gt;# an integer
12&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code class=&quot;language-yaml&quot;&gt;# an octal
014&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code class=&quot;language-yaml&quot;&gt;# an hexadecimal
0xC&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code class=&quot;language-yaml&quot;&gt;# a float
13.4&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code class=&quot;language-yaml&quot;&gt;# an exponential number
1.2e+34&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code class=&quot;language-yaml&quot;&gt;# infinity
.inf&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Nulls&lt;/h3&gt;
&lt;p&gt;Nulls in YAML can be expressed with &lt;code&gt;null&lt;/code&gt; or &lt;code&gt;~&lt;/code&gt;.&lt;/p&gt;
&lt;h3&gt;Booleans&lt;/h3&gt;
&lt;p&gt;Booleans in YAML are expressed with &lt;code&gt;true&lt;/code&gt; and &lt;code&gt;false&lt;/code&gt;.&lt;/p&gt;
&lt;h3&gt;Dates&lt;/h3&gt;
&lt;p&gt;YAML uses the ISO-8601 standard to express dates:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-yaml&quot;&gt;2001-12-14t21:59:43.10-05:00&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code class=&quot;language-yaml&quot;&gt;# simple date
2002-12-14&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Collections&lt;/h2&gt;
&lt;p&gt;A YAML file is rarely used to describe a simple scalar. Most of the time, it
describes a collection. A collection can be a sequence or a mapping of
elements. Both sequences and mappings are converted to PHP arrays.&lt;/p&gt;
&lt;p&gt;Sequences use a dash followed by a space:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-yaml&quot;&gt;- PHP
- Perl
- Python&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The previous YAML file is equivalent to the following PHP code:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-php&quot;&gt;array('PHP', 'Perl', 'Python');&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Mappings use a colon followed by a space (&lt;code&gt;:&lt;/code&gt; ) to mark each key/value pair:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-yaml&quot;&gt;PHP: 5.2
MySQL: 5.1
Apache: 2.2.20&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;which is equivalent to this PHP code:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-php&quot;&gt;array('PHP' =&amp;gt; 5.2, 'MySQL' =&amp;gt; 5.1, 'Apache' =&amp;gt; '2.2.20');&lt;/code&gt;&lt;/pre&gt;
&lt;blockquote&gt;
&lt;blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;In a mapping, a key can be any valid scalar.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;p&gt;The number of spaces between the colon and the value does not matter:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-yaml&quot;&gt;PHP:    5.2
MySQL:  5.1
Apache: 2.2.20&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;YAML uses indentation with one or more spaces to describe nested collections:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-yaml&quot;&gt;'symfony 1.0':
  PHP:    5.0
  Propel: 1.2
'symfony 1.2':
  PHP:    5.2
  Propel: 1.3&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The above YAML is equivalent to the following PHP code:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-php&quot;&gt;array(
  'symfony 1.0' =&amp;gt; array(
    'PHP'    =&amp;gt; 5.0,
    'Propel' =&amp;gt; 1.2,
  ),
  'symfony 1.2' =&amp;gt; array(
    'PHP'    =&amp;gt; 5.2,
    'Propel' =&amp;gt; 1.3,
  ),
);&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;There is one important thing you need to remember when using indentation in a
YAML file: &lt;em&gt;Indentation must be done with one or more spaces, but never with
tabulators&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;You can nest sequences and mappings as you like:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-yaml&quot;&gt;'Chapter 1':
  - Introduction
  - Event Types
'Chapter 2':
  - Introduction
  - Helpers&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;YAML can also use flow styles for collections, using explicit indicators
rather than indentation to denote scope.&lt;/p&gt;
&lt;p&gt;A sequence can be written as a comma separated list within square brackets
(&lt;code&gt;[]&lt;/code&gt;):&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-yaml&quot;&gt;[PHP, Perl, Python]&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;A mapping can be written as a comma separated list of key/values within curly
braces (&lt;code&gt;{}&lt;/code&gt;):&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-yaml&quot;&gt;{ PHP: 5.2, MySQL: 5.1, Apache: 2.2.20 }&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;You can mix and match styles to achieve a better readability:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-yaml&quot;&gt;'Chapter 1': [Introduction, Event Types]
'Chapter 2': [Introduction, Helpers]&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code class=&quot;language-yaml&quot;&gt;'symfony 1.0': { PHP: 5.0, Propel: 1.2 }
'symfony 1.2': { PHP: 5.2, Propel: 1.3 }&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Comments&lt;/h2&gt;
&lt;p&gt;Comments can be added in YAML by prefixing them with a hash mark (&lt;code&gt;#&lt;/code&gt;):&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-yaml&quot;&gt;# Comment on a line
&quot;symfony 1.0&quot;: { PHP: 5.0, Propel: 1.2 } # Comment at the end of a line
&quot;symfony 1.2&quot;: { PHP: 5.2, Propel: 1.3 }&lt;/code&gt;&lt;/pre&gt;
&lt;blockquote&gt;
&lt;blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;Comments are simply ignored by the YAML parser and do not need to be indented according to the current level of nesting in a collection.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;p&gt;Taken from &lt;a href=&quot;https://symfony.com/doc/current/components/yaml/yaml_format.html&quot;&gt;Symfony YAML doc&lt;/a&gt;&lt;/p&gt;</summary>
		<content type="html">&lt;p&gt;According to the official &lt;a href=&quot;https://yaml.org/&quot;&gt;YAML&lt;/a&gt; website, YAML is &amp;quot;a human friendly data
serialization standard for all programming languages&amp;quot;.&lt;/p&gt;
&lt;p&gt;Even if the YAML format can describe complex nested data structure, this
chapter only describes the minimum set of features needed to use YAML as a
configuration file format.&lt;/p&gt;
&lt;p&gt;YAML is a simple language that describes data. As PHP, it has a syntax for
simple types like strings, booleans, floats, or integers. But unlike PHP, it
makes a difference between arrays (sequences) and hashes (mappings).&lt;/p&gt;
&lt;h3&gt;Scalars&lt;/h3&gt;
&lt;p&gt;The syntax for scalars is similar to the PHP syntax.&lt;/p&gt;
&lt;h3&gt;Strings&lt;/h3&gt;
&lt;p&gt;Strings in YAML can be wrapped both in single and double quotes. In some cases,
they can also be unquoted:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-yaml&quot;&gt;A string in YAML

'A singled-quoted string in YAML'

&quot;A double-quoted string in YAML&quot;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Quoted styles are useful when a string starts or end with one or more relevant
spaces, because unquoted strings are trimmed on both end when parsing their
contents. Quotes are required when the string contains special or reserved characters.&lt;/p&gt;
&lt;p&gt;When using single-quoted strings, any single quote &lt;code&gt;'&lt;/code&gt; inside its contents
must be doubled to escape it:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-yaml&quot;&gt;'A single quote '' inside a single-quoted string'&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Strings containing any of the following characters must be quoted. Although you
can use double quotes, for these characters it is more convenient to use single
quotes, which avoids having to escape any backslash &lt;code&gt;\&lt;/code&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;:&lt;/code&gt;, &lt;code&gt;{&lt;/code&gt;, &lt;code&gt;}&lt;/code&gt;, &lt;code&gt;[&lt;/code&gt;, &lt;code&gt;]&lt;/code&gt;, &lt;code&gt;,&lt;/code&gt;, &lt;code&gt;&amp;amp;&lt;/code&gt;, &lt;code&gt;*&lt;/code&gt;, &lt;code&gt;#&lt;/code&gt;, &lt;code&gt;?&lt;/code&gt;, &lt;code&gt;|&lt;/code&gt;,
&lt;code&gt;-&lt;/code&gt;, &lt;code&gt;&amp;lt;&lt;/code&gt;, &lt;code&gt;&amp;gt;&lt;/code&gt;, &lt;code&gt;=&lt;/code&gt;, &lt;code&gt;!&lt;/code&gt;, &lt;code&gt;%&lt;/code&gt;, &lt;code&gt;@&lt;/code&gt;, &lt;code&gt;\&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The double-quoted style provides a way to express arbitrary strings, by
using &lt;code&gt;\&lt;/code&gt; to escape characters and sequences. For instance, it is very useful
when you need to embed a &lt;code&gt;\n&lt;/code&gt; or a Unicode character in a string.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-yaml&quot;&gt;&quot;A double-quoted string in YAML\n&quot;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;If the string contains any of the following control characters, it must be
escaped with double quotes:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;\0&lt;/code&gt;, &lt;code&gt;\x01&lt;/code&gt;, &lt;code&gt;\x02&lt;/code&gt;, &lt;code&gt;\x03&lt;/code&gt;, &lt;code&gt;\x04&lt;/code&gt;, &lt;code&gt;\x05&lt;/code&gt;, &lt;code&gt;\x06&lt;/code&gt;, &lt;code&gt;\a&lt;/code&gt;,
&lt;code&gt;\b&lt;/code&gt;, &lt;code&gt;\t&lt;/code&gt;, &lt;code&gt;\n&lt;/code&gt;, &lt;code&gt;\v&lt;/code&gt;, &lt;code&gt;\f&lt;/code&gt;, &lt;code&gt;\r&lt;/code&gt;, &lt;code&gt;\x0e&lt;/code&gt;, &lt;code&gt;\x0f&lt;/code&gt;, &lt;code&gt;\x10&lt;/code&gt;,
&lt;code&gt;\x11&lt;/code&gt;, &lt;code&gt;\x12&lt;/code&gt;, &lt;code&gt;\x13&lt;/code&gt;, &lt;code&gt;\x14&lt;/code&gt;, &lt;code&gt;\x15&lt;/code&gt;, &lt;code&gt;\x16&lt;/code&gt;, &lt;code&gt;\x17&lt;/code&gt;, &lt;code&gt;\x18&lt;/code&gt;,
&lt;code&gt;\x19&lt;/code&gt;, &lt;code&gt;\x1a&lt;/code&gt;, &lt;code&gt;\e&lt;/code&gt;, &lt;code&gt;\x1c&lt;/code&gt;, &lt;code&gt;\x1d&lt;/code&gt;, &lt;code&gt;\x1e&lt;/code&gt;, &lt;code&gt;\x1f&lt;/code&gt;, &lt;code&gt;\N&lt;/code&gt;,
&lt;code&gt;\_&lt;/code&gt;, &lt;code&gt;\L&lt;/code&gt;, &lt;code&gt;\P&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Finally, there are other cases when the strings must be quoted, no matter if
you're using single or double quotes:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;When the string is &lt;code&gt;true&lt;/code&gt; or &lt;code&gt;false&lt;/code&gt; (otherwise, it would be treated as a
boolean value);&lt;/li&gt;
&lt;li&gt;When the string is &lt;code&gt;null&lt;/code&gt; or &lt;code&gt;~&lt;/code&gt; (otherwise, it would be considered as a
&lt;code&gt;null&lt;/code&gt; value);&lt;/li&gt;
&lt;li&gt;When the string looks like a number, such as integers (e.g. &lt;code&gt;2&lt;/code&gt;, &lt;code&gt;14&lt;/code&gt;, etc.),
floats (e.g. &lt;code&gt;2.6&lt;/code&gt;, &lt;code&gt;14.9&lt;/code&gt;) and exponential numbers (e.g. &lt;code&gt;12e7&lt;/code&gt;, etc.)
(otherwise, it would be treated as a numeric value);&lt;/li&gt;
&lt;li&gt;When the string looks like a date (e.g. &lt;code&gt;2014-12-31&lt;/code&gt;) (otherwise it would be
automatically converted into a Unix timestamp).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;When a string contains line breaks, you can use the literal style, indicated
by the pipe (&lt;code&gt;|&lt;/code&gt;), to indicate that the string will span several lines. In
literals, newlines are preserved:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-yaml&quot;&gt;|
  \/ /| |\/| |
  / / | |  | |__&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Alternatively, strings can be written with the folded style, denoted by &lt;code&gt;&amp;gt;&lt;/code&gt;,
where each line break is replaced by a space:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-yaml&quot;&gt;&amp;gt;
This is a very long sentence
that spans several lines in the YAML
but which will be rendered as a string
without carriage returns.&lt;/code&gt;&lt;/pre&gt;
&lt;blockquote&gt;
&lt;blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;Notice the two spaces before each line in the previous examples. They won't appear in the resulting PHP strings.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;h3&gt;Numbers&lt;/h3&gt;
&lt;pre&gt;&lt;code class=&quot;language-yaml&quot;&gt;# an integer
12&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code class=&quot;language-yaml&quot;&gt;# an octal
014&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code class=&quot;language-yaml&quot;&gt;# an hexadecimal
0xC&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code class=&quot;language-yaml&quot;&gt;# a float
13.4&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code class=&quot;language-yaml&quot;&gt;# an exponential number
1.2e+34&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code class=&quot;language-yaml&quot;&gt;# infinity
.inf&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Nulls&lt;/h3&gt;
&lt;p&gt;Nulls in YAML can be expressed with &lt;code&gt;null&lt;/code&gt; or &lt;code&gt;~&lt;/code&gt;.&lt;/p&gt;
&lt;h3&gt;Booleans&lt;/h3&gt;
&lt;p&gt;Booleans in YAML are expressed with &lt;code&gt;true&lt;/code&gt; and &lt;code&gt;false&lt;/code&gt;.&lt;/p&gt;
&lt;h3&gt;Dates&lt;/h3&gt;
&lt;p&gt;YAML uses the ISO-8601 standard to express dates:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-yaml&quot;&gt;2001-12-14t21:59:43.10-05:00&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code class=&quot;language-yaml&quot;&gt;# simple date
2002-12-14&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Collections&lt;/h2&gt;
&lt;p&gt;A YAML file is rarely used to describe a simple scalar. Most of the time, it
describes a collection. A collection can be a sequence or a mapping of
elements. Both sequences and mappings are converted to PHP arrays.&lt;/p&gt;
&lt;p&gt;Sequences use a dash followed by a space:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-yaml&quot;&gt;- PHP
- Perl
- Python&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The previous YAML file is equivalent to the following PHP code:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-php&quot;&gt;array('PHP', 'Perl', 'Python');&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Mappings use a colon followed by a space (&lt;code&gt;:&lt;/code&gt; ) to mark each key/value pair:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-yaml&quot;&gt;PHP: 5.2
MySQL: 5.1
Apache: 2.2.20&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;which is equivalent to this PHP code:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-php&quot;&gt;array('PHP' =&amp;gt; 5.2, 'MySQL' =&amp;gt; 5.1, 'Apache' =&amp;gt; '2.2.20');&lt;/code&gt;&lt;/pre&gt;
&lt;blockquote&gt;
&lt;blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;In a mapping, a key can be any valid scalar.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;p&gt;The number of spaces between the colon and the value does not matter:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-yaml&quot;&gt;PHP:    5.2
MySQL:  5.1
Apache: 2.2.20&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;YAML uses indentation with one or more spaces to describe nested collections:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-yaml&quot;&gt;'symfony 1.0':
  PHP:    5.0
  Propel: 1.2
'symfony 1.2':
  PHP:    5.2
  Propel: 1.3&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The above YAML is equivalent to the following PHP code:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-php&quot;&gt;array(
  'symfony 1.0' =&amp;gt; array(
    'PHP'    =&amp;gt; 5.0,
    'Propel' =&amp;gt; 1.2,
  ),
  'symfony 1.2' =&amp;gt; array(
    'PHP'    =&amp;gt; 5.2,
    'Propel' =&amp;gt; 1.3,
  ),
);&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;There is one important thing you need to remember when using indentation in a
YAML file: &lt;em&gt;Indentation must be done with one or more spaces, but never with
tabulators&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;You can nest sequences and mappings as you like:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-yaml&quot;&gt;'Chapter 1':
  - Introduction
  - Event Types
'Chapter 2':
  - Introduction
  - Helpers&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;YAML can also use flow styles for collections, using explicit indicators
rather than indentation to denote scope.&lt;/p&gt;
&lt;p&gt;A sequence can be written as a comma separated list within square brackets
(&lt;code&gt;[]&lt;/code&gt;):&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-yaml&quot;&gt;[PHP, Perl, Python]&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;A mapping can be written as a comma separated list of key/values within curly
braces (&lt;code&gt;{}&lt;/code&gt;):&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-yaml&quot;&gt;{ PHP: 5.2, MySQL: 5.1, Apache: 2.2.20 }&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;You can mix and match styles to achieve a better readability:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-yaml&quot;&gt;'Chapter 1': [Introduction, Event Types]
'Chapter 2': [Introduction, Helpers]&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code class=&quot;language-yaml&quot;&gt;'symfony 1.0': { PHP: 5.0, Propel: 1.2 }
'symfony 1.2': { PHP: 5.2, Propel: 1.3 }&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Comments&lt;/h2&gt;
&lt;p&gt;Comments can be added in YAML by prefixing them with a hash mark (&lt;code&gt;#&lt;/code&gt;):&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-yaml&quot;&gt;# Comment on a line
&quot;symfony 1.0&quot;: { PHP: 5.0, Propel: 1.2 } # Comment at the end of a line
&quot;symfony 1.2&quot;: { PHP: 5.2, Propel: 1.3 }&lt;/code&gt;&lt;/pre&gt;
&lt;blockquote&gt;
&lt;blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;Comments are simply ignored by the YAML parser and do not need to be indented according to the current level of nesting in a collection.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;p&gt;Taken from &lt;a href=&quot;https://symfony.com/doc/current/components/yaml/yaml_format.html&quot;&gt;Symfony YAML doc&lt;/a&gt;&lt;/p&gt;</content>
		<category term="Developers" />
	</entry>
	<entry>
		<title>Utility Functions</title>
		<link rel="alternate" type="text/html" href="https://www.themexpert.com/docs/quix/developers/utility-functions"/>
		<published>2016-05-09T10:03:02+06:00</published>
		<updated>2016-05-09T10:03:02+06:00</updated>
		<id>https://www.themexpert.com/docs/quix/developers/utility-functions</id>
		<author>
			<name>Parvez Akther</name>
			<email>parvez@themexpert.com</email>
		</author>
		<summary type="html">&lt;p&gt;Quix comes with so many utility functions and classes to help you develop faster.&lt;/p&gt;
&lt;h2&gt;classNames&lt;/h2&gt;
&lt;p&gt;A simple utility function for conditionally joining classNames together. Example:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-php&quot;&gt;$classes = classNames( &quot;qx-element qx-element-{$type} {$field['class']}&quot;, $visibilityClasses, [
    'qx-text-left' =&amp;gt; $field['alignment'] === 'left',
    'qx-text-center' =&amp;gt; $field['alignment'] === 'center',
    'qx-text-right' =&amp;gt; $field['alignment'] === 'right',
    &quot;wow {$field['animation']}&quot; =&amp;gt; $field['animation']
]);&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Think you have an alignment slectbox in your element config that allow you to control text alignment. Bootstrap comes with alignment classes so you need to add right class in your &lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt; or &lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt; tag.&lt;/p&gt;
&lt;h4&gt;Traditional Way&lt;/h4&gt;
&lt;pre&gt;&lt;code class=&quot;language-php&quot;&gt;$class = '';
if( $field['alignment'] == 'left' ){
  $class = 'qx-text-left';
}elseif( $field['alignment'] == 'center' ){
  $class = 'qx-text-center';
}elseif( $field['alignment'] == 'right' ){
  $class = 'qx-text-right';
}&lt;/code&gt;&lt;/pre&gt;
&lt;h4&gt;classNames() Function&lt;/h4&gt;
&lt;pre&gt;&lt;code class=&quot;language-php&quot;&gt;$classes = classNames([
    'qx-text-left' =&amp;gt; $field['alignment'] === 'left',
    'qx-text-center' =&amp;gt; $field['alignment'] === 'center',
    'qx-text-right' =&amp;gt; $field['alignment'] === 'right',
]);&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Plus you can join many class together, like :&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-php&quot;&gt;$classes = classNames( &quot;qx-element qx-element-{$type}&quot;,[
    'qx-text-left' =&amp;gt; $field['alignment'] === 'left',
    'qx-text-center' =&amp;gt; $field['alignment'] === 'center',
    'qx-text-right' =&amp;gt; $field['alignment'] === 'right',
    &quot;wow {$field['animation']}&quot; =&amp;gt; $field['animation']
]);&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;code&gt;&quot;wow {$field['animation']}&quot; =&amp;gt; $field['animation']&lt;/code&gt; based on animation settings.&lt;/p&gt;
&lt;blockquote&gt;
&lt;blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;This class is designed to reduce your conditional code. Take a look at all core element for better understanding of its usages.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;h4&gt;More Example of classNames()&lt;/h4&gt;
&lt;pre&gt;&lt;code class=&quot;language-php&quot;&gt;classNames('foo', 'bar'); // =&amp;gt; 'foo bar'
classNames('foo', [ bar: true ]); // =&amp;gt; 'foo bar'
classNames([ 'foo-bar': true ]); // =&amp;gt; 'foo-bar'
classNames([ 'foo-bar': false ]); // =&amp;gt; ''
classNames([ foo: true ], [ bar: true ]); // =&amp;gt; 'foo bar'
classNames([ foo: true, bar: true ]); // =&amp;gt; 'foo bar'

// lots of arguments of various types
classNames('foo', [ bar: true, duck: false ], 'baz', [ quux: true ]); // =&amp;gt; 'foo bar baz quux'

// other falsy values are just ignored
classNames(null, false, 'bar', undefined, 0, 1, [ baz: null ], ''); // =&amp;gt; 'bar 1'&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Css Helpers&lt;/h2&gt;
&lt;h4&gt;Font&lt;/h4&gt;
&lt;pre&gt;&lt;code class=&quot;language-php&quot;&gt;&amp;lt;?php Css::fonts($field['font']);?&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This function automatically determine the font properties from your config and output them. If any of your typography field left blank, this function will not output it. Css output example:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-css&quot;&gt;font-family: 'Ubuntu';
font-size: 16px;
line-height: 30px;
....&lt;/code&gt;&lt;/pre&gt;
&lt;h4&gt;Margin&lt;/h4&gt;
&lt;pre&gt;&lt;code class=&quot;language-php&quot;&gt;&amp;lt;?php Css::margin($field['margin']);?&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This function automatically determine the margin properties from your config and output them accordingly. If any field left blank, this function will not output it. Css output example:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-css&quot;&gt;margin-top: 16px;
margin-btoom: 30px;
....&lt;/code&gt;&lt;/pre&gt;
&lt;h4&gt;Padding&lt;/h4&gt;
&lt;pre&gt;&lt;code class=&quot;language-php&quot;&gt;&amp;lt;?php Css::padding($field['padding']);?&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This function automatically determine the padding properties from your config and output them accordingly. If any field left blank, this function will not output it. Css output example:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-css&quot;&gt;padding-top: 16px;
padding-btoom: 30px;
....&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Css Properties&lt;/h2&gt;
&lt;pre&gt;&lt;code class=&quot;language-php&quot;&gt;&amp;lt;?php Css::prop('color', $field['text_color']);?&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This is a dynamic class for all css properties. First argument takes the css &lt;em&gt;properties&lt;/em&gt; and second argument takes the &lt;em&gt;value&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;More example :&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-php&quot;&gt;&amp;lt;?php Css::prop('background-repeat', $field['image_repeat']);?&amp;gt;
&amp;lt;?php Css::prop('background-position', $field['image_position']);?&amp;gt;
&amp;lt;?php Css::prop('background-size', $field['image_size']);?&amp;gt;&lt;/code&gt;&lt;/pre&gt;</summary>
		<content type="html">&lt;p&gt;Quix comes with so many utility functions and classes to help you develop faster.&lt;/p&gt;
&lt;h2&gt;classNames&lt;/h2&gt;
&lt;p&gt;A simple utility function for conditionally joining classNames together. Example:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-php&quot;&gt;$classes = classNames( &quot;qx-element qx-element-{$type} {$field['class']}&quot;, $visibilityClasses, [
    'qx-text-left' =&amp;gt; $field['alignment'] === 'left',
    'qx-text-center' =&amp;gt; $field['alignment'] === 'center',
    'qx-text-right' =&amp;gt; $field['alignment'] === 'right',
    &quot;wow {$field['animation']}&quot; =&amp;gt; $field['animation']
]);&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Think you have an alignment slectbox in your element config that allow you to control text alignment. Bootstrap comes with alignment classes so you need to add right class in your &lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt; or &lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt; tag.&lt;/p&gt;
&lt;h4&gt;Traditional Way&lt;/h4&gt;
&lt;pre&gt;&lt;code class=&quot;language-php&quot;&gt;$class = '';
if( $field['alignment'] == 'left' ){
  $class = 'qx-text-left';
}elseif( $field['alignment'] == 'center' ){
  $class = 'qx-text-center';
}elseif( $field['alignment'] == 'right' ){
  $class = 'qx-text-right';
}&lt;/code&gt;&lt;/pre&gt;
&lt;h4&gt;classNames() Function&lt;/h4&gt;
&lt;pre&gt;&lt;code class=&quot;language-php&quot;&gt;$classes = classNames([
    'qx-text-left' =&amp;gt; $field['alignment'] === 'left',
    'qx-text-center' =&amp;gt; $field['alignment'] === 'center',
    'qx-text-right' =&amp;gt; $field['alignment'] === 'right',
]);&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Plus you can join many class together, like :&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-php&quot;&gt;$classes = classNames( &quot;qx-element qx-element-{$type}&quot;,[
    'qx-text-left' =&amp;gt; $field['alignment'] === 'left',
    'qx-text-center' =&amp;gt; $field['alignment'] === 'center',
    'qx-text-right' =&amp;gt; $field['alignment'] === 'right',
    &quot;wow {$field['animation']}&quot; =&amp;gt; $field['animation']
]);&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;code&gt;&quot;wow {$field['animation']}&quot; =&amp;gt; $field['animation']&lt;/code&gt; based on animation settings.&lt;/p&gt;
&lt;blockquote&gt;
&lt;blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;This class is designed to reduce your conditional code. Take a look at all core element for better understanding of its usages.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;h4&gt;More Example of classNames()&lt;/h4&gt;
&lt;pre&gt;&lt;code class=&quot;language-php&quot;&gt;classNames('foo', 'bar'); // =&amp;gt; 'foo bar'
classNames('foo', [ bar: true ]); // =&amp;gt; 'foo bar'
classNames([ 'foo-bar': true ]); // =&amp;gt; 'foo-bar'
classNames([ 'foo-bar': false ]); // =&amp;gt; ''
classNames([ foo: true ], [ bar: true ]); // =&amp;gt; 'foo bar'
classNames([ foo: true, bar: true ]); // =&amp;gt; 'foo bar'

// lots of arguments of various types
classNames('foo', [ bar: true, duck: false ], 'baz', [ quux: true ]); // =&amp;gt; 'foo bar baz quux'

// other falsy values are just ignored
classNames(null, false, 'bar', undefined, 0, 1, [ baz: null ], ''); // =&amp;gt; 'bar 1'&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Css Helpers&lt;/h2&gt;
&lt;h4&gt;Font&lt;/h4&gt;
&lt;pre&gt;&lt;code class=&quot;language-php&quot;&gt;&amp;lt;?php Css::fonts($field['font']);?&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This function automatically determine the font properties from your config and output them. If any of your typography field left blank, this function will not output it. Css output example:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-css&quot;&gt;font-family: 'Ubuntu';
font-size: 16px;
line-height: 30px;
....&lt;/code&gt;&lt;/pre&gt;
&lt;h4&gt;Margin&lt;/h4&gt;
&lt;pre&gt;&lt;code class=&quot;language-php&quot;&gt;&amp;lt;?php Css::margin($field['margin']);?&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This function automatically determine the margin properties from your config and output them accordingly. If any field left blank, this function will not output it. Css output example:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-css&quot;&gt;margin-top: 16px;
margin-btoom: 30px;
....&lt;/code&gt;&lt;/pre&gt;
&lt;h4&gt;Padding&lt;/h4&gt;
&lt;pre&gt;&lt;code class=&quot;language-php&quot;&gt;&amp;lt;?php Css::padding($field['padding']);?&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This function automatically determine the padding properties from your config and output them accordingly. If any field left blank, this function will not output it. Css output example:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-css&quot;&gt;padding-top: 16px;
padding-btoom: 30px;
....&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Css Properties&lt;/h2&gt;
&lt;pre&gt;&lt;code class=&quot;language-php&quot;&gt;&amp;lt;?php Css::prop('color', $field['text_color']);?&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This is a dynamic class for all css properties. First argument takes the css &lt;em&gt;properties&lt;/em&gt; and second argument takes the &lt;em&gt;value&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;More example :&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-php&quot;&gt;&amp;lt;?php Css::prop('background-repeat', $field['image_repeat']);?&amp;gt;
&amp;lt;?php Css::prop('background-position', $field['image_position']);?&amp;gt;
&amp;lt;?php Css::prop('background-size', $field['image_size']);?&amp;gt;&lt;/code&gt;&lt;/pre&gt;</content>
		<category term="Developers" />
	</entry>
	<entry>
		<title>Elements Overriding and Extending</title>
		<link rel="alternate" type="text/html" href="https://www.themexpert.com/docs/quix/developers/elements-overriding-extending"/>
		<published>2016-05-09T10:01:39+06:00</published>
		<updated>2016-05-09T10:01:39+06:00</updated>
		<id>https://www.themexpert.com/docs/quix/developers/elements-overriding-extending</id>
		<author>
			<name>Parvez Akther</name>
			<email>parvez@themexpert.com</email>
		</author>
		<summary type="html">&lt;p&gt;Sometime you need to override core elements style and view for your theme. When creating overrides, you should always keep these files in your &lt;code&gt;quix&lt;/code&gt; directory.&lt;/p&gt;
&lt;blockquote&gt;
&lt;blockquote&gt;
&lt;blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;Do not change any core element files. You may loose all changes when you update Quix.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;</summary>
		<content type="html">&lt;p&gt;Sometime you need to override core elements style and view for your theme. When creating overrides, you should always keep these files in your &lt;code&gt;quix&lt;/code&gt; directory.&lt;/p&gt;
&lt;blockquote&gt;
&lt;blockquote&gt;
&lt;blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;Do not change any core element files. You may loose all changes when you update Quix.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;</content>
		<category term="Developers" />
	</entry>
	<entry>
		<title>Creating a New Element</title>
		<link rel="alternate" type="text/html" href="https://www.themexpert.com/docs/quix/developers/creating-a-new-element"/>
		<published>2016-05-09T10:00:55+06:00</published>
		<updated>2016-05-09T10:00:55+06:00</updated>
		<id>https://www.themexpert.com/docs/quix/developers/creating-a-new-element</id>
		<author>
			<name>Parvez Akther</name>
			<email>parvez@themexpert.com</email>
		</author>
		<summary type="html">&lt;p&gt;Creating a new &lt;strong&gt;Element&lt;/strong&gt; in Quix is a pretty straightforward process. You will need a text editor(Notepad, Sublime Text), as you will be &lt;strong&gt;creating three files&lt;/strong&gt; for the Element.&lt;/p&gt;
&lt;p&gt;Lets create a simple &lt;strong&gt;Call To Action&lt;/strong&gt; element. This Element consist of three main fields, &lt;strong&gt;Title, Description&lt;/strong&gt; and &lt;strong&gt;Button&lt;/strong&gt; and few style fields. Elements can be as simple or complex as you need them to be.&lt;/p&gt;
&lt;h2&gt;File Structure&lt;/h2&gt;
&lt;pre&gt;&lt;code&gt;.
├── call_to_action
|   ├── config.yml
|   ├── view.php
|   ├── style.php
|   ├── element.svg/png&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Creating the Config file&lt;/h2&gt;
&lt;p&gt;While creating your Element, it may be easier to start with the &lt;code&gt;config.yml&lt;/code&gt; file as this store configuration data. The &lt;code&gt;view.php&lt;/code&gt; file pull the information and output them and &lt;code&gt;style.php&lt;/code&gt; are being used in style the Element. The &lt;code&gt;element.svg&lt;/code&gt; or &lt;code&gt;element.png&lt;/code&gt; represent the Element on Element list.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://www.themexpert.com/images/docs/quix/02.developers/01.creating-a-new-element/create-element-1.jpg&quot; alt=&quot;Create an element&quot; class=&quot;img-responsive&quot; /&gt;
Navigate to your template folder and create a folder name &lt;code&gt;quix&lt;/code&gt; and then create another folder inside name &lt;code&gt;elements&lt;/code&gt;. Now create the Element folders and files.&lt;/p&gt;
&lt;blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;If you are not familiar with YAML, read our &lt;a href=&quot;https://www.themexpert.com/docs/quix/developers/understanding-yaml&quot;&gt;Understanding YAML&lt;/a&gt; doc. You can use PHP array based configuration. Create &lt;code&gt;config.php&lt;/code&gt; file instead.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;h3&gt;YAML file code example&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;config.yml&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-yaml&quot;&gt;name: Call To Action
slug: call_to_action
groups: content

form:
  general:
    - name: title
      type: text
      help: Provide title text

    - name: description
      type: editor
      value: Lorem ipsum dolor sit amet timeam
      help: Create or modify your description.

    - name: button 
      type: link

  styles:
    - name: font
      type: typography

    - name: title_color
      type: color

    - name: description_color
      type: color

    - name: bg_color
      type: color
      label: Background Color

    - name: margin
      type: margin

    - name: padding
      type: padding&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;PHP file code example&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;config.php&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-php&quot;&gt;return [
  'name' =&amp;gt; 'Call To Action',
  'slug' =&amp;gt; 'call-to-action',
  'groups' =&amp;gt; ['content'],
  'form' =&amp;gt; [
    'general' =&amp;gt; [
      [ 
        'name' =&amp;gt; 'title', 
        'type' =&amp;gt; 'text',  
        'help' =&amp;gt; 'Provide title text' 
      ],
      [ 
        'name' =&amp;gt; 'description', 
        'type' =&amp;gt; 'editor',  
        'value' =&amp;gt; 'Lorem ipsum dolor sit amet timeam'
        'help' =&amp;gt; 'Create or modify your description.' 
      ],
      [
        'name' =&amp;gt; 'button',
        'type' =&amp;gt; 'link'
      ]
    ],
    'styles' =&amp;gt; [
      [
        'name' =&amp;gt; 'font',
        'type' =&amp;gt; 'typography'
      ],
      [
        'name' =&amp;gt; 'title_color',
        'type' =&amp;gt; 'color'
      ],
      [
        'name' =&amp;gt; 'description_color',
        'type' =&amp;gt; 'color'
      ],
      [
        'name' =&amp;gt; 'bg_color',
        'type' =&amp;gt; 'color'
        'label' =&amp;gt; 'Background Color'
      ],
      [ 'name' =&amp;gt; 'margin', 'type' =&amp;gt; 'margin'],
      [ 'name' =&amp;gt; 'padding', 'type' =&amp;gt; 'padding'],
    ]
  ],
];&lt;/code&gt;&lt;/pre&gt;
&lt;blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;In PHP 5.4 and above you can write array like &lt;code&gt;'general'=&amp;gt; []&lt;/code&gt; instead &lt;code&gt;'general'=&amp;gt; array()&lt;/code&gt;.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;p&gt;This YAML is made up of two main parts. First, the head of the file which sets the &lt;strong&gt;Name, Slug&lt;/strong&gt;, and &lt;strong&gt;Group&lt;/strong&gt;. The &lt;strong&gt;Name&lt;/strong&gt; is what appears in the administrator as the title of the Element in the &lt;strong&gt;Element List&lt;/strong&gt; and &lt;strong&gt;Settings&lt;/strong&gt; panels. The &lt;strong&gt;Slug&lt;/strong&gt; is the unique indentifier of the Element. The &lt;strong&gt;Groups&lt;/strong&gt; is use to organize the Element on list page.&lt;/p&gt;
&lt;blockquote&gt;
&lt;blockquote&gt;
&lt;blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;The &lt;strong&gt;Slug&lt;/strong&gt; must be an unique name and same as the Element folder name.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;p&gt;The second section sets the forms/fields that appear in the administrator Element settings. These fields are what appear in the administrator and are accessible to site managers. They give them the ability to do things like set custom text, titles, and toggle settings.&lt;/p&gt;
&lt;p&gt;The first block &lt;code&gt;general&lt;/code&gt; is the name of the tab under the fields will be visible. It tells Quix to organize the fields under differnet tab.&lt;/p&gt;
&lt;p&gt;There are three main tabs for every Element settings:&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Tab&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;General&lt;/td&gt;
&lt;td&gt;Put your content related fields (&lt;em&gt;title, description, image&lt;/em&gt;) and general fields(&lt;em&gt;alignment, animation, etc&lt;/em&gt;) here.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Style&lt;/td&gt;
&lt;td&gt;Pull all style releated fields here, &lt;em&gt;color, typography, background&lt;/em&gt; etc.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Advanced&lt;/td&gt;
&lt;td&gt;Quix automatically push this tab to every Element settings screen allow you to set &lt;em&gt;name, id&lt;/em&gt; and &lt;em&gt;class&lt;/em&gt;.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;Here is a breakdown of the settings used in the example above and how they affect the file:&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Settings&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Name&lt;/td&gt;
&lt;td&gt;(Required) Unique Name identifying the field. Must be different from all other field names.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Type&lt;/td&gt;
&lt;td&gt;(Required) Sets the type of field. This determines if your user will see a text field, checkbox, toggle, or some other input type. More about &lt;a href=&quot;https://&quot;&gt;field type&lt;/a&gt;.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Label&lt;/td&gt;
&lt;td&gt;(Optional) This label appears on the backend next to the field, letting the user know what it is/does. Fall back to name field if not provided.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Help&lt;/td&gt;
&lt;td&gt;(Optional) This field sets the additional instrution to the user.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Value&lt;/td&gt;
&lt;td&gt;This sets the default value that appears in the field. If it's a text field, you would enter text. If it's a toggle, you would set it a &lt;code&gt;true&lt;/code&gt; or &lt;code&gt;false&lt;/code&gt;.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h2&gt;Creating the View File&lt;/h2&gt;
&lt;p&gt;The next file you will need to create will sit in the same directory as the YAML file is &lt;code&gt;view.php&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Here is the content of the &lt;code&gt;view.php&lt;/code&gt; file:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;?php
  $classes = classNames( &quot;qx-element qx-element-{$type} {$field['class']}&quot;, $visibilityClasses );
?&amp;gt;
&amp;lt;div id=&quot;&amp;lt;?php echo $id; ?&amp;gt;&quot; class=&quot;&amp;lt;?php echo $classes; ?&amp;gt;&quot;&amp;gt;
  &amp;lt;?php if($field['title']):?&amp;gt;
    &amp;lt;h3&amp;gt;&amp;lt;?php echo $field['title']; ?&amp;gt;&amp;lt;/h3&amp;gt;
  &amp;lt;?php endif; ?&amp;gt;

  &amp;lt;?php if($field['description']):?&amp;gt;
    &amp;lt;div&amp;gt;&amp;lt;?php echo $field['description']; ?&amp;gt;&amp;lt;/div&amp;gt;
  &amp;lt;?php endif; ?&amp;gt;

  &amp;lt;?php if(&amp;lt;?php echo $field['button']['text'] ?&amp;gt;):?&amp;gt;
    &amp;lt;a 
      class=&quot;qx-btn qx-btn-default&quot; 
      href=&quot;https://www.themexpert.com/&amp;lt;?php echo $field['button']['url'] ?&amp;gt;&quot; 
      &amp;lt;?php echo ( $field['button']['target'] ) ? ' target=&quot;_blank&quot;' : '' ?&amp;gt;&amp;gt;
      &amp;lt;?php echo $field['button']['text'] ?&amp;gt;
    &amp;lt;/a&amp;gt;
  &amp;lt;?php endif; ?&amp;gt;
&amp;lt;/div&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This is basic example of a view file.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-php&quot;&gt;$classes = classNames( &quot;qx-element qx-element-{$type} {$field['class']}&quot;, $visibilityClasses );&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;code&gt;classNames&lt;/code&gt; is an utility function gives you flexibility of adding classes. See our &lt;a href=&quot;https://&quot;&gt;utility functions page&lt;/a&gt; for more details. There are few variable available in every Element view file. &lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Variable&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;$id&lt;/td&gt;
&lt;td&gt;Unique ID for every Element. Quix create an unique ID and you can change it from &lt;strong&gt;Advanced Tab&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;$type&lt;/td&gt;
&lt;td&gt;Element type define in &lt;code&gt;slug&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;$visibilityClasses&lt;/td&gt;
&lt;td&gt;Bootstrap responsive classes added by Quix.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;$field['class']&lt;/td&gt;
&lt;td&gt;You can add extra class for Element from &lt;strong&gt;Advanced Tab&lt;/strong&gt; and get the value using this code.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;Accessing fields value is pretty straightforward using the &lt;code&gt;$field&lt;/code&gt; variable. You can pull any field value using &lt;code&gt;$field['NAME']&lt;/code&gt; code.&lt;/p&gt;
&lt;h2&gt;Styling the Element&lt;/h2&gt;
&lt;p&gt;Create &lt;code&gt;style.php&lt;/code&gt; file under the same directory of yoru YAML file. Quix seperate styleing from view file so it looks clean and easily managable.&lt;/p&gt;
&lt;p&gt;Here is the content of &lt;code&gt;style.php&lt;/code&gt; file :&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;#&amp;lt;?php echo $id?&amp;gt;{
  &amp;lt;?php Css::fonts($field['font']);?&amp;gt;
  &amp;lt;?php Css::prop('background', $field['bg_color']);?&amp;gt;
  &amp;lt;?php Css::margin($field['margin']);?&amp;gt;
  &amp;lt;?php Css::padding($field['padding']);?&amp;gt;
}
#&amp;lt;?php echo $id?&amp;gt; h3{
  &amp;lt;?php Css::prop('color', $field['title_color']);?&amp;gt;
}
#&amp;lt;?php echo $id?&amp;gt; div{
  &amp;lt;?php Css::prop('color', $field['description_color']);?&amp;gt;
}&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;You can write simple css code here. &lt;code&gt;#&amp;lt;?php echo $id?&amp;gt;&lt;/code&gt; code ensure this style only affecting this element.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;?php Css::prop('color', $field['description_color']);?&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This css helper function will reduce your conditional check for each field. First argument takes css &lt;code&gt;properties&lt;/code&gt; and second is the field value. See our &lt;a href=&quot;https://www.themexpert.com/docs/quix/developers/utility-functions&quot;&gt;utility functions page&lt;/a&gt; for more details.&lt;/p&gt;</summary>
		<content type="html">&lt;p&gt;Creating a new &lt;strong&gt;Element&lt;/strong&gt; in Quix is a pretty straightforward process. You will need a text editor(Notepad, Sublime Text), as you will be &lt;strong&gt;creating three files&lt;/strong&gt; for the Element.&lt;/p&gt;
&lt;p&gt;Lets create a simple &lt;strong&gt;Call To Action&lt;/strong&gt; element. This Element consist of three main fields, &lt;strong&gt;Title, Description&lt;/strong&gt; and &lt;strong&gt;Button&lt;/strong&gt; and few style fields. Elements can be as simple or complex as you need them to be.&lt;/p&gt;
&lt;h2&gt;File Structure&lt;/h2&gt;
&lt;pre&gt;&lt;code&gt;.
├── call_to_action
|   ├── config.yml
|   ├── view.php
|   ├── style.php
|   ├── element.svg/png&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Creating the Config file&lt;/h2&gt;
&lt;p&gt;While creating your Element, it may be easier to start with the &lt;code&gt;config.yml&lt;/code&gt; file as this store configuration data. The &lt;code&gt;view.php&lt;/code&gt; file pull the information and output them and &lt;code&gt;style.php&lt;/code&gt; are being used in style the Element. The &lt;code&gt;element.svg&lt;/code&gt; or &lt;code&gt;element.png&lt;/code&gt; represent the Element on Element list.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://www.themexpert.com/images/docs/quix/02.developers/01.creating-a-new-element/create-element-1.jpg&quot; alt=&quot;Create an element&quot; class=&quot;img-responsive&quot; /&gt;
Navigate to your template folder and create a folder name &lt;code&gt;quix&lt;/code&gt; and then create another folder inside name &lt;code&gt;elements&lt;/code&gt;. Now create the Element folders and files.&lt;/p&gt;
&lt;blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;If you are not familiar with YAML, read our &lt;a href=&quot;https://www.themexpert.com/docs/quix/developers/understanding-yaml&quot;&gt;Understanding YAML&lt;/a&gt; doc. You can use PHP array based configuration. Create &lt;code&gt;config.php&lt;/code&gt; file instead.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;h3&gt;YAML file code example&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;config.yml&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-yaml&quot;&gt;name: Call To Action
slug: call_to_action
groups: content

form:
  general:
    - name: title
      type: text
      help: Provide title text

    - name: description
      type: editor
      value: Lorem ipsum dolor sit amet timeam
      help: Create or modify your description.

    - name: button 
      type: link

  styles:
    - name: font
      type: typography

    - name: title_color
      type: color

    - name: description_color
      type: color

    - name: bg_color
      type: color
      label: Background Color

    - name: margin
      type: margin

    - name: padding
      type: padding&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;PHP file code example&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;config.php&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-php&quot;&gt;return [
  'name' =&amp;gt; 'Call To Action',
  'slug' =&amp;gt; 'call-to-action',
  'groups' =&amp;gt; ['content'],
  'form' =&amp;gt; [
    'general' =&amp;gt; [
      [ 
        'name' =&amp;gt; 'title', 
        'type' =&amp;gt; 'text',  
        'help' =&amp;gt; 'Provide title text' 
      ],
      [ 
        'name' =&amp;gt; 'description', 
        'type' =&amp;gt; 'editor',  
        'value' =&amp;gt; 'Lorem ipsum dolor sit amet timeam'
        'help' =&amp;gt; 'Create or modify your description.' 
      ],
      [
        'name' =&amp;gt; 'button',
        'type' =&amp;gt; 'link'
      ]
    ],
    'styles' =&amp;gt; [
      [
        'name' =&amp;gt; 'font',
        'type' =&amp;gt; 'typography'
      ],
      [
        'name' =&amp;gt; 'title_color',
        'type' =&amp;gt; 'color'
      ],
      [
        'name' =&amp;gt; 'description_color',
        'type' =&amp;gt; 'color'
      ],
      [
        'name' =&amp;gt; 'bg_color',
        'type' =&amp;gt; 'color'
        'label' =&amp;gt; 'Background Color'
      ],
      [ 'name' =&amp;gt; 'margin', 'type' =&amp;gt; 'margin'],
      [ 'name' =&amp;gt; 'padding', 'type' =&amp;gt; 'padding'],
    ]
  ],
];&lt;/code&gt;&lt;/pre&gt;
&lt;blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;In PHP 5.4 and above you can write array like &lt;code&gt;'general'=&amp;gt; []&lt;/code&gt; instead &lt;code&gt;'general'=&amp;gt; array()&lt;/code&gt;.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;p&gt;This YAML is made up of two main parts. First, the head of the file which sets the &lt;strong&gt;Name, Slug&lt;/strong&gt;, and &lt;strong&gt;Group&lt;/strong&gt;. The &lt;strong&gt;Name&lt;/strong&gt; is what appears in the administrator as the title of the Element in the &lt;strong&gt;Element List&lt;/strong&gt; and &lt;strong&gt;Settings&lt;/strong&gt; panels. The &lt;strong&gt;Slug&lt;/strong&gt; is the unique indentifier of the Element. The &lt;strong&gt;Groups&lt;/strong&gt; is use to organize the Element on list page.&lt;/p&gt;
&lt;blockquote&gt;
&lt;blockquote&gt;
&lt;blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;The &lt;strong&gt;Slug&lt;/strong&gt; must be an unique name and same as the Element folder name.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;p&gt;The second section sets the forms/fields that appear in the administrator Element settings. These fields are what appear in the administrator and are accessible to site managers. They give them the ability to do things like set custom text, titles, and toggle settings.&lt;/p&gt;
&lt;p&gt;The first block &lt;code&gt;general&lt;/code&gt; is the name of the tab under the fields will be visible. It tells Quix to organize the fields under differnet tab.&lt;/p&gt;
&lt;p&gt;There are three main tabs for every Element settings:&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Tab&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;General&lt;/td&gt;
&lt;td&gt;Put your content related fields (&lt;em&gt;title, description, image&lt;/em&gt;) and general fields(&lt;em&gt;alignment, animation, etc&lt;/em&gt;) here.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Style&lt;/td&gt;
&lt;td&gt;Pull all style releated fields here, &lt;em&gt;color, typography, background&lt;/em&gt; etc.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Advanced&lt;/td&gt;
&lt;td&gt;Quix automatically push this tab to every Element settings screen allow you to set &lt;em&gt;name, id&lt;/em&gt; and &lt;em&gt;class&lt;/em&gt;.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;Here is a breakdown of the settings used in the example above and how they affect the file:&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Settings&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Name&lt;/td&gt;
&lt;td&gt;(Required) Unique Name identifying the field. Must be different from all other field names.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Type&lt;/td&gt;
&lt;td&gt;(Required) Sets the type of field. This determines if your user will see a text field, checkbox, toggle, or some other input type. More about &lt;a href=&quot;https://&quot;&gt;field type&lt;/a&gt;.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Label&lt;/td&gt;
&lt;td&gt;(Optional) This label appears on the backend next to the field, letting the user know what it is/does. Fall back to name field if not provided.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Help&lt;/td&gt;
&lt;td&gt;(Optional) This field sets the additional instrution to the user.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Value&lt;/td&gt;
&lt;td&gt;This sets the default value that appears in the field. If it's a text field, you would enter text. If it's a toggle, you would set it a &lt;code&gt;true&lt;/code&gt; or &lt;code&gt;false&lt;/code&gt;.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h2&gt;Creating the View File&lt;/h2&gt;
&lt;p&gt;The next file you will need to create will sit in the same directory as the YAML file is &lt;code&gt;view.php&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Here is the content of the &lt;code&gt;view.php&lt;/code&gt; file:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;?php
  $classes = classNames( &quot;qx-element qx-element-{$type} {$field['class']}&quot;, $visibilityClasses );
?&amp;gt;
&amp;lt;div id=&quot;&amp;lt;?php echo $id; ?&amp;gt;&quot; class=&quot;&amp;lt;?php echo $classes; ?&amp;gt;&quot;&amp;gt;
  &amp;lt;?php if($field['title']):?&amp;gt;
    &amp;lt;h3&amp;gt;&amp;lt;?php echo $field['title']; ?&amp;gt;&amp;lt;/h3&amp;gt;
  &amp;lt;?php endif; ?&amp;gt;

  &amp;lt;?php if($field['description']):?&amp;gt;
    &amp;lt;div&amp;gt;&amp;lt;?php echo $field['description']; ?&amp;gt;&amp;lt;/div&amp;gt;
  &amp;lt;?php endif; ?&amp;gt;

  &amp;lt;?php if(&amp;lt;?php echo $field['button']['text'] ?&amp;gt;):?&amp;gt;
    &amp;lt;a 
      class=&quot;qx-btn qx-btn-default&quot; 
      href=&quot;https://www.themexpert.com/&amp;lt;?php echo $field['button']['url'] ?&amp;gt;&quot; 
      &amp;lt;?php echo ( $field['button']['target'] ) ? ' target=&quot;_blank&quot;' : '' ?&amp;gt;&amp;gt;
      &amp;lt;?php echo $field['button']['text'] ?&amp;gt;
    &amp;lt;/a&amp;gt;
  &amp;lt;?php endif; ?&amp;gt;
&amp;lt;/div&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This is basic example of a view file.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-php&quot;&gt;$classes = classNames( &quot;qx-element qx-element-{$type} {$field['class']}&quot;, $visibilityClasses );&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;code&gt;classNames&lt;/code&gt; is an utility function gives you flexibility of adding classes. See our &lt;a href=&quot;https://&quot;&gt;utility functions page&lt;/a&gt; for more details. There are few variable available in every Element view file. &lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Variable&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;$id&lt;/td&gt;
&lt;td&gt;Unique ID for every Element. Quix create an unique ID and you can change it from &lt;strong&gt;Advanced Tab&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;$type&lt;/td&gt;
&lt;td&gt;Element type define in &lt;code&gt;slug&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;$visibilityClasses&lt;/td&gt;
&lt;td&gt;Bootstrap responsive classes added by Quix.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;$field['class']&lt;/td&gt;
&lt;td&gt;You can add extra class for Element from &lt;strong&gt;Advanced Tab&lt;/strong&gt; and get the value using this code.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;Accessing fields value is pretty straightforward using the &lt;code&gt;$field&lt;/code&gt; variable. You can pull any field value using &lt;code&gt;$field['NAME']&lt;/code&gt; code.&lt;/p&gt;
&lt;h2&gt;Styling the Element&lt;/h2&gt;
&lt;p&gt;Create &lt;code&gt;style.php&lt;/code&gt; file under the same directory of yoru YAML file. Quix seperate styleing from view file so it looks clean and easily managable.&lt;/p&gt;
&lt;p&gt;Here is the content of &lt;code&gt;style.php&lt;/code&gt; file :&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;#&amp;lt;?php echo $id?&amp;gt;{
  &amp;lt;?php Css::fonts($field['font']);?&amp;gt;
  &amp;lt;?php Css::prop('background', $field['bg_color']);?&amp;gt;
  &amp;lt;?php Css::margin($field['margin']);?&amp;gt;
  &amp;lt;?php Css::padding($field['padding']);?&amp;gt;
}
#&amp;lt;?php echo $id?&amp;gt; h3{
  &amp;lt;?php Css::prop('color', $field['title_color']);?&amp;gt;
}
#&amp;lt;?php echo $id?&amp;gt; div{
  &amp;lt;?php Css::prop('color', $field['description_color']);?&amp;gt;
}&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;You can write simple css code here. &lt;code&gt;#&amp;lt;?php echo $id?&amp;gt;&lt;/code&gt; code ensure this style only affecting this element.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;?php Css::prop('color', $field['description_color']);?&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This css helper function will reduce your conditional check for each field. First argument takes css &lt;code&gt;properties&lt;/code&gt; and second is the field value. See our &lt;a href=&quot;https://www.themexpert.com/docs/quix/developers/utility-functions&quot;&gt;utility functions page&lt;/a&gt; for more details.&lt;/p&gt;</content>
		<category term="Developers" />
	</entry>
	<entry>
		<title>Element Field Types</title>
		<link rel="alternate" type="text/html" href="https://www.themexpert.com/docs/quix/developers/element-field-types"/>
		<published>2016-05-09T09:59:43+06:00</published>
		<updated>2016-05-09T09:59:43+06:00</updated>
		<id>https://www.themexpert.com/docs/quix/developers/element-field-types</id>
		<author>
			<name>Parvez Akther</name>
			<email>parvez@themexpert.com</email>
		</author>
		<summary type="html">&lt;p&gt;Quix has lots of built-in form fileds which you can use to build your element. Look at our step by step guide to &lt;a href=&quot;https://www.themexpert.com/docs/quix/developers/creating-a-new-element&quot;&gt;creating an element&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;Which fields you can use&lt;/h2&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th style=&quot;text-align: left;&quot;&gt;Field&lt;/th&gt;
&lt;th style=&quot;text-align: left;&quot;&gt;Description&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td style=&quot;text-align: left;&quot;&gt;&lt;strong&gt;&lt;a href=&quot;https://www.themexpert.com/#the-text-field&quot;&gt;Text&lt;/a&gt;&lt;/strong&gt;&lt;/td&gt;
&lt;td style=&quot;text-align: left;&quot;&gt;A simple text field&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;text-align: left;&quot;&gt;&lt;strong&gt;&lt;a href=&quot;https://www.themexpert.com/#the-textarea-field&quot;&gt;Textarea&lt;/a&gt;&lt;/strong&gt;&lt;/td&gt;
&lt;td style=&quot;text-align: left;&quot;&gt;A textarea&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;text-align: left;&quot;&gt;&lt;strong&gt;&lt;a href=&quot;https://www.themexpert.com/#the-link-field&quot;&gt;Link&lt;/a&gt;&lt;/strong&gt;&lt;/td&gt;
&lt;td style=&quot;text-align: left;&quot;&gt;Link field with all associated fields&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;text-align: left;&quot;&gt;&lt;strong&gt;&lt;a href=&quot;https://www.themexpert.com/#the-switch-field&quot;&gt;Switch&lt;/a&gt;&lt;/strong&gt;&lt;/td&gt;
&lt;td style=&quot;text-align: left;&quot;&gt;A switch value field&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;text-align: left;&quot;&gt;&lt;strong&gt;&lt;a href=&quot;https://www.themexpert.com/#the-icon-field&quot;&gt;Icon&lt;/a&gt;&lt;/strong&gt;&lt;/td&gt;
&lt;td style=&quot;text-align: left;&quot;&gt;A fontawesome icon slector&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;text-align: left;&quot;&gt;&lt;strong&gt;&lt;a href=&quot;https://www.themexpert.com/#the-image-field&quot;&gt;Image&lt;/a&gt;&lt;/strong&gt;&lt;/td&gt;
&lt;td style=&quot;text-align: left;&quot;&gt;A image field for uploading and selecting image&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;text-align: left;&quot;&gt;&lt;strong&gt;&lt;a href=&quot;https://www.themexpert.com/#the-select-field&quot;&gt;Select&lt;/a&gt;&lt;/strong&gt;&lt;/td&gt;
&lt;td style=&quot;text-align: left;&quot;&gt;A select field&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;text-align: left;&quot;&gt;&lt;strong&gt;&lt;a href=&quot;https://www.themexpert.com/#the-editor-field&quot;&gt;Editor&lt;/a&gt;&lt;/strong&gt;&lt;/td&gt;
&lt;td style=&quot;text-align: left;&quot;&gt;A WYSIWYG editor field&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;text-align: left;&quot;&gt;&lt;strong&gt;&lt;a href=&quot;https://www.themexpert.com/#the-typography-field&quot;&gt;Typography&lt;/a&gt;&lt;/strong&gt;&lt;/td&gt;
&lt;td style=&quot;text-align: left;&quot;&gt;Typography selector fields&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;text-align: left;&quot;&gt;&lt;strong&gt;&lt;a href=&quot;https://www.themexpert.com/#the-color-field&quot;&gt;Color&lt;/a&gt;&lt;/strong&gt;&lt;/td&gt;
&lt;td style=&quot;text-align: left;&quot;&gt;A color input field&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;text-align: left;&quot;&gt;&lt;strong&gt;&lt;a href=&quot;https://www.themexpert.com/#the-margin-field&quot;&gt;Margin&lt;/a&gt;&lt;/strong&gt;&lt;/td&gt;
&lt;td style=&quot;text-align: left;&quot;&gt;A margin input field&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;text-align: left;&quot;&gt;&lt;strong&gt;&lt;a href=&quot;https://www.themexpert.com/#the-padding-field&quot;&gt;Padding&lt;/a&gt;&lt;/strong&gt;&lt;/td&gt;
&lt;td style=&quot;text-align: left;&quot;&gt;A padding input field&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;text-align: left;&quot;&gt;&lt;strong&gt;&lt;a href=&quot;https://www.themexpert.com/#the-slider-field&quot;&gt;Slider&lt;/a&gt;&lt;/strong&gt;&lt;/td&gt;
&lt;td style=&quot;text-align: left;&quot;&gt;A range input type&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;text-align: left;&quot;&gt;&lt;strong&gt;&lt;a href=&quot;https://www.themexpert.com/#the-divider-field&quot;&gt;Divider&lt;/a&gt;&lt;/strong&gt;&lt;/td&gt;
&lt;td style=&quot;text-align: left;&quot;&gt;Used to add a title, text or an horizontal line to the form&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;text-align: left;&quot;&gt;&lt;strong&gt;&lt;a href=&quot;https://www.themexpert.com/#the-input-repeater-field&quot;&gt;Input Repeater&lt;/a&gt;&lt;/strong&gt;&lt;/td&gt;
&lt;td style=&quot;text-align: left;&quot;&gt;A single input repeater field&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;text-align: left;&quot;&gt;&lt;strong&gt;&lt;a href=&quot;https://www.themexpert.com/#the-group-repeater-field&quot;&gt;Group Repeater&lt;/a&gt;&lt;/strong&gt;&lt;/td&gt;
&lt;td style=&quot;text-align: left;&quot;&gt;Group input repeater field can contain multiple input field&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h3&gt;Common Fields Attributes&lt;/h3&gt;
&lt;p&gt;Every field accepts a list of attributes you can use. Each field could share these common attributes, but particular fields might ignore them. The best way to check which attributes are allowed on a field is to check the field description in this page, and see which attributes are mentioned.&lt;/p&gt;
&lt;p&gt;This list provides a common ground so there's no need to repeat the description of a common field.&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th style=&quot;text-align: left;&quot;&gt;Attribute&lt;/th&gt;
&lt;th style=&quot;text-align: left;&quot;&gt;Description&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td style=&quot;text-align: left;&quot;&gt;&lt;code&gt;name&lt;/code&gt;&lt;/td&gt;
&lt;td style=&quot;text-align: left;&quot;&gt;sets the field name&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;text-align: left;&quot;&gt;&lt;code&gt;type&lt;/code&gt;&lt;/td&gt;
&lt;td style=&quot;text-align: left;&quot;&gt;sets the field type&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;text-align: left;&quot;&gt;&lt;code&gt;label&lt;/code&gt;&lt;/td&gt;
&lt;td style=&quot;text-align: left;&quot;&gt;sets the field label (optional)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;text-align: left;&quot;&gt;&lt;code&gt;help&lt;/code&gt;&lt;/td&gt;
&lt;td style=&quot;text-align: left;&quot;&gt;Adds a tooltip to the field (optional)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;text-align: left;&quot;&gt;&lt;code&gt;value&lt;/code&gt;&lt;/td&gt;
&lt;td style=&quot;text-align: left;&quot;&gt;sets the field default value (optional)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;text-align: left;&quot;&gt;&lt;code&gt;depends&lt;/code&gt;&lt;/td&gt;
&lt;td style=&quot;text-align: left;&quot;&gt;sets the field depends another field (optional)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h3&gt;Positive values&lt;/h3&gt;
&lt;p&gt;You can set positive values in multiple ways: &lt;code&gt;'true'&lt;/code&gt;, &lt;code&gt;1&lt;/code&gt;.
Other values are interpreted as negative.&lt;/p&gt;
&lt;hr /&gt;
&lt;h3&gt;The Text Field {#the-text-field}&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;text&lt;/code&gt; field is used to present a text input field.&lt;/p&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-yaml&quot;&gt;- name: title
  type: text&lt;/code&gt;&lt;/pre&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th style=&quot;text-align: left;&quot;&gt;Common Attributes Allowed&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td style=&quot;text-align: left;&quot;&gt;&lt;a href=&quot;https://www.themexpert.com/#common-fields-attributes&quot;&gt;name&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;text-align: left;&quot;&gt;&lt;a href=&quot;https://www.themexpert.com/#common-fields-attributes&quot;&gt;label&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;text-align: left;&quot;&gt;&lt;a href=&quot;https://www.themexpert.com/#common-fields-attributes&quot;&gt;help&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;text-align: left;&quot;&gt;&lt;a href=&quot;https://www.themexpert.com/#common-value-attributes&quot;&gt;value&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;</summary>
		<content type="html">&lt;p&gt;Quix has lots of built-in form fileds which you can use to build your element. Look at our step by step guide to &lt;a href=&quot;https://www.themexpert.com/docs/quix/developers/creating-a-new-element&quot;&gt;creating an element&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;Which fields you can use&lt;/h2&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th style=&quot;text-align: left;&quot;&gt;Field&lt;/th&gt;
&lt;th style=&quot;text-align: left;&quot;&gt;Description&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td style=&quot;text-align: left;&quot;&gt;&lt;strong&gt;&lt;a href=&quot;https://www.themexpert.com/#the-text-field&quot;&gt;Text&lt;/a&gt;&lt;/strong&gt;&lt;/td&gt;
&lt;td style=&quot;text-align: left;&quot;&gt;A simple text field&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;text-align: left;&quot;&gt;&lt;strong&gt;&lt;a href=&quot;https://www.themexpert.com/#the-textarea-field&quot;&gt;Textarea&lt;/a&gt;&lt;/strong&gt;&lt;/td&gt;
&lt;td style=&quot;text-align: left;&quot;&gt;A textarea&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;text-align: left;&quot;&gt;&lt;strong&gt;&lt;a href=&quot;https://www.themexpert.com/#the-link-field&quot;&gt;Link&lt;/a&gt;&lt;/strong&gt;&lt;/td&gt;
&lt;td style=&quot;text-align: left;&quot;&gt;Link field with all associated fields&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;text-align: left;&quot;&gt;&lt;strong&gt;&lt;a href=&quot;https://www.themexpert.com/#the-switch-field&quot;&gt;Switch&lt;/a&gt;&lt;/strong&gt;&lt;/td&gt;
&lt;td style=&quot;text-align: left;&quot;&gt;A switch value field&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;text-align: left;&quot;&gt;&lt;strong&gt;&lt;a href=&quot;https://www.themexpert.com/#the-icon-field&quot;&gt;Icon&lt;/a&gt;&lt;/strong&gt;&lt;/td&gt;
&lt;td style=&quot;text-align: left;&quot;&gt;A fontawesome icon slector&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;text-align: left;&quot;&gt;&lt;strong&gt;&lt;a href=&quot;https://www.themexpert.com/#the-image-field&quot;&gt;Image&lt;/a&gt;&lt;/strong&gt;&lt;/td&gt;
&lt;td style=&quot;text-align: left;&quot;&gt;A image field for uploading and selecting image&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;text-align: left;&quot;&gt;&lt;strong&gt;&lt;a href=&quot;https://www.themexpert.com/#the-select-field&quot;&gt;Select&lt;/a&gt;&lt;/strong&gt;&lt;/td&gt;
&lt;td style=&quot;text-align: left;&quot;&gt;A select field&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;text-align: left;&quot;&gt;&lt;strong&gt;&lt;a href=&quot;https://www.themexpert.com/#the-editor-field&quot;&gt;Editor&lt;/a&gt;&lt;/strong&gt;&lt;/td&gt;
&lt;td style=&quot;text-align: left;&quot;&gt;A WYSIWYG editor field&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;text-align: left;&quot;&gt;&lt;strong&gt;&lt;a href=&quot;https://www.themexpert.com/#the-typography-field&quot;&gt;Typography&lt;/a&gt;&lt;/strong&gt;&lt;/td&gt;
&lt;td style=&quot;text-align: left;&quot;&gt;Typography selector fields&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;text-align: left;&quot;&gt;&lt;strong&gt;&lt;a href=&quot;https://www.themexpert.com/#the-color-field&quot;&gt;Color&lt;/a&gt;&lt;/strong&gt;&lt;/td&gt;
&lt;td style=&quot;text-align: left;&quot;&gt;A color input field&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;text-align: left;&quot;&gt;&lt;strong&gt;&lt;a href=&quot;https://www.themexpert.com/#the-margin-field&quot;&gt;Margin&lt;/a&gt;&lt;/strong&gt;&lt;/td&gt;
&lt;td style=&quot;text-align: left;&quot;&gt;A margin input field&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;text-align: left;&quot;&gt;&lt;strong&gt;&lt;a href=&quot;https://www.themexpert.com/#the-padding-field&quot;&gt;Padding&lt;/a&gt;&lt;/strong&gt;&lt;/td&gt;
&lt;td style=&quot;text-align: left;&quot;&gt;A padding input field&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;text-align: left;&quot;&gt;&lt;strong&gt;&lt;a href=&quot;https://www.themexpert.com/#the-slider-field&quot;&gt;Slider&lt;/a&gt;&lt;/strong&gt;&lt;/td&gt;
&lt;td style=&quot;text-align: left;&quot;&gt;A range input type&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;text-align: left;&quot;&gt;&lt;strong&gt;&lt;a href=&quot;https://www.themexpert.com/#the-divider-field&quot;&gt;Divider&lt;/a&gt;&lt;/strong&gt;&lt;/td&gt;
&lt;td style=&quot;text-align: left;&quot;&gt;Used to add a title, text or an horizontal line to the form&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;text-align: left;&quot;&gt;&lt;strong&gt;&lt;a href=&quot;https://www.themexpert.com/#the-input-repeater-field&quot;&gt;Input Repeater&lt;/a&gt;&lt;/strong&gt;&lt;/td&gt;
&lt;td style=&quot;text-align: left;&quot;&gt;A single input repeater field&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;text-align: left;&quot;&gt;&lt;strong&gt;&lt;a href=&quot;https://www.themexpert.com/#the-group-repeater-field&quot;&gt;Group Repeater&lt;/a&gt;&lt;/strong&gt;&lt;/td&gt;
&lt;td style=&quot;text-align: left;&quot;&gt;Group input repeater field can contain multiple input field&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h3&gt;Common Fields Attributes&lt;/h3&gt;
&lt;p&gt;Every field accepts a list of attributes you can use. Each field could share these common attributes, but particular fields might ignore them. The best way to check which attributes are allowed on a field is to check the field description in this page, and see which attributes are mentioned.&lt;/p&gt;
&lt;p&gt;This list provides a common ground so there's no need to repeat the description of a common field.&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th style=&quot;text-align: left;&quot;&gt;Attribute&lt;/th&gt;
&lt;th style=&quot;text-align: left;&quot;&gt;Description&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td style=&quot;text-align: left;&quot;&gt;&lt;code&gt;name&lt;/code&gt;&lt;/td&gt;
&lt;td style=&quot;text-align: left;&quot;&gt;sets the field name&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;text-align: left;&quot;&gt;&lt;code&gt;type&lt;/code&gt;&lt;/td&gt;
&lt;td style=&quot;text-align: left;&quot;&gt;sets the field type&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;text-align: left;&quot;&gt;&lt;code&gt;label&lt;/code&gt;&lt;/td&gt;
&lt;td style=&quot;text-align: left;&quot;&gt;sets the field label (optional)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;text-align: left;&quot;&gt;&lt;code&gt;help&lt;/code&gt;&lt;/td&gt;
&lt;td style=&quot;text-align: left;&quot;&gt;Adds a tooltip to the field (optional)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;text-align: left;&quot;&gt;&lt;code&gt;value&lt;/code&gt;&lt;/td&gt;
&lt;td style=&quot;text-align: left;&quot;&gt;sets the field default value (optional)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;text-align: left;&quot;&gt;&lt;code&gt;depends&lt;/code&gt;&lt;/td&gt;
&lt;td style=&quot;text-align: left;&quot;&gt;sets the field depends another field (optional)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h3&gt;Positive values&lt;/h3&gt;
&lt;p&gt;You can set positive values in multiple ways: &lt;code&gt;'true'&lt;/code&gt;, &lt;code&gt;1&lt;/code&gt;.
Other values are interpreted as negative.&lt;/p&gt;
&lt;hr /&gt;
&lt;h3&gt;The Text Field {#the-text-field}&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;text&lt;/code&gt; field is used to present a text input field.&lt;/p&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-yaml&quot;&gt;- name: title
  type: text&lt;/code&gt;&lt;/pre&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th style=&quot;text-align: left;&quot;&gt;Common Attributes Allowed&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td style=&quot;text-align: left;&quot;&gt;&lt;a href=&quot;https://www.themexpert.com/#common-fields-attributes&quot;&gt;name&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;text-align: left;&quot;&gt;&lt;a href=&quot;https://www.themexpert.com/#common-fields-attributes&quot;&gt;label&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;text-align: left;&quot;&gt;&lt;a href=&quot;https://www.themexpert.com/#common-fields-attributes&quot;&gt;help&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;text-align: left;&quot;&gt;&lt;a href=&quot;https://www.themexpert.com/#common-value-attributes&quot;&gt;value&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;</content>
		<category term="Developers" />
	</entry>
</feed>
