URL filters

Attribute Return type Description
asset_url string or null Returns the URL of a file in the „assets“ folder of a theme.
global_asset_url string Returns the URL of a global asset file.
add_manufactu­rer_url string or null Adds manufacturer to the category URL.
remove_manufac­turer_url string or null Removes manufacturer from the category URL.
add_tag_url string or null Adds tag to the category URL.
remove_tag_url string or null Removes tag from the category URL.
add_custom_fi­eld_url string or null Adds custom field query to the URL.
remove_custom_fi­eld_url string or null Removes custom field query from the URL.
add_option_url string or null Adds option query to the URL.
add_product_ty­pe_url string or null Adds product type query to the URL.
remove_option_url string or null Removes option query from the URL.
remove_produc­t_type_url string or null Removes product type query from the URL.
download_url string or null Creates download URL from a filename.
file_url string or null Returns the URL of a file in the /admin/files page.
set_query string or null Appends query parameter to URL and sets its value.
remove_query string or null Removes query parameter from URL.
add_blog_tag_url string or null Adds tag to the blog URL.
remove_blog_tag_­url string or null Removes tag from the blog URL.

asset_url

Returns the URL of a file in the „assets“ folder of a theme.

{{ 'filename.txt' | asset_url }}
{# http://www.yourdomain.com/themes/current_theme/assets/filename.txt?m=1234567890 #}

global_asset_url

Returns the URL of a global asset file.

Global assets are kept in a directory on Sellastica's ser­vers. You can browse all available global asset files here: https://ftp.napojse.cz/napojse_cz/beta_assets/

{{ 'foundation/foundation.js' | global_asset_url }}
{# http://assets.sellastica.com/web/production/foundation/foundation.js #}

add_manufactu­rer_url

Adds manufacturer to the category URL.

URL parameter must be an absolute URL, but is optional. If no URL is provided, the current URL will be used.

Note that filter is functional for category URLs only

{{ 'Foo' | add_manufacturer_url('http://www.sellastica.com/category/name/manufacturers:bar') }}
{# http://www.sellastica.com/category/name/manufacturers:bar,foo #}
{{ 'Foo' | add_manufacturer_url }}
{# http://www.sellastica.com/category/name/manufacturers:bar,foo #}
{{ 'Foo' | add_manufacturer_url('http://www.sellastica.com/category/name') }}
{# http://www.sellastica.com/category/name/manufacturers:foo #}

Manufacturer name can be also a manufacturer object:

{{ manufacturer | add_manufacturer_url }}
{# http://www.sellastica.com/category/name/manufacturers:foo #}

remove_manufac­turer_url

Removes manufacturer from the category URL.

URL parameter must be an absolute URL, but is optional. If no URL is provided, the current URL will be used.

Note that filter is functional for category URLs only

{{ 'Foo' | remove_manufacturer_url('http://www.sellastica.com/category/name/manufacturers:bar,foo') }}
{# http://www.sellastica.com/category/name/manufacturers:bar #}
{{ 'Foo' | remove_manufacturer_url }}
{# http://www.sellastica.com/category/name/manufacturers:bar #}
{{ 'Foo' | remove_manufacturer_url('http://www.sellastica.com/category/name/manufacturers:foo') }}
{# http://www.sellastica.com/category/name #}

Manufacturer name can be also a manufacturer object:

{{ manufacturer | remove_manufacturer_url }}
{# http://www.sellastica.com/category/name/manufacturers:bar #}

add_tag_url

Adds tag to the category URL.

URL parameter must be an absolute URL, but is optional. If no URL is provided, the current URL will be used.

Note that filter is functional for category URLs only

{{ 'Foo' | add_tag_url('http://www.sellastica.com/category/name/tags:bar') }}
{# http://www.sellastica.com/category/name/tags:bar,foo #}
{{ 'Foo' | add_tag_url }}
{# http://www.sellastica.com/category/name/tags:bar,foo #}
{{ 'Foo' | add_tag_url('http://www.sellastica.com/category/name') }}
{# http://www.sellastica.com/category/name/tags:foo #}

Tag name can be also a tag object:

{{ tag | add_tag_url }}
{# http://www.sellastica.com/category/name/tags:foo #}

remove_tag_url

Removes tag from the category URL.

URL parameter must be an absolute URL, but is optional. If no URL is provided, the current URL will be used.

Note that filter is functional for category URLs only

{{ 'Foo' | remove_tag_url('http://www.sellastica.com/category/name/tags:bar,foo') }}
{# http://www.sellastica.com/category/name/tags:bar #}
{{ 'Foo' | remove_tag_url }}
{# http://www.sellastica.com/category/name/tags:bar #}
{{ 'Foo' | remove_tag_url('http://www.sellastica.com/category/name/tags:foo') }}
{# http://www.sellastica.com/category/name #}

Tag name can be also a tag object:

{{ tag | remove_tag_url }}
{# http://www.sellastica.com/category/name/tags:bar #}

add_custom_fi­eld_url

Adds custom field query to the URL.

Filter also removes page parameter. The parameter must be a custom_field object.

URL parameter must be an absolute URL, but is optional. If no URL is provided, the current URL will be used.

{{ custom_field | add_custom_field_url('http://www.sellastica.com/category/name') }}
{# http://www.sellastica.com/category/name?custom_field[123][0]=456' #}

remove_custom_fi­eld_url

Removes custom field query from the URL.

Filter also removes page parameter. The parameter must be a custom_field object.

URL parameter must be an absolute URL, but is optional. If no URL is provided, the current URL will be used.

{{ custom_field | add_custom_field_url('http://www.sellastica.com/category/name?custom_field[123][0]=456') }}
{# http://www.sellastica.com/category/name' #}

add_option_url

Adds option query to the URL.

Filter also removes page parameter. The parameter must be an option object.

URL parameter must be an absolute URL, but is optional. If no URL is provided, the current URL will be used.

{{ option | add_option_url('http://www.sellastica.com/category/name') }}
{# http://www.sellastica.com/category/name?option[123][0]=456' #}

add_product_ty­pe_url

Adds product type query to the URL.

Filter also removes page parameter. The parameter must be a product_type object.

URL parameter must be an absolute URL, but is optional. If no URL is provided, the current URL will be used.

{{ product_type | add_product_type_url('http://www.sellastica.com/category/name') }}
{# http://www.sellastica.com/category/name?type_id=123' #}
{{ product_type | add_product_type_url('http://www.sellastica.com/category/name?type_id=123') }}
{# http://www.sellastica.com/category/name?type_id=123,456' #}

remove_option_url

Removes option query from the URL.

Filter also removes page parameter. The parameter must be a option object.

URL parameter must be an absolute URL, but is optional. If no URL is provided, the current URL will be used.

{{ option | add_option_url('http://www.sellastica.com/category/name?option[123][0]=456') }}
{# http://www.sellastica.com/category/name' #}

remove_produc­t_type_url

Removes product type query from the URL.

Filter also removes page parameter. The parameter must be a product_type object.

URL parameter must be an absolute URL, but is optional. If no URL is provided, the current URL will be used.

{{ option | remove_product_type_url('http://www.sellastica.com/category/name?type_id=123') }}
{# http://www.sellastica.com/category/name' #}

download_url

Creates download URL from a filename.

After clicking on this URL, a download dialog is displayed.

{{ 'filename.txt' | download_url }}
{# http://www.sellastica.com/request/download?file=filename.txt #}

file_url

Returns the URL of a file in the /admin/files page.

{{ 'filename.txt' | file_url }}
{# http://www.yourdomain.com/public/files/filename.txt #}

set_query

Appends query parameter to URL and sets its value.

URL must be absolute.

{{ 'http://www.sellastica.com/' | set_query('foo', 'bar') }}
{# http://www.sellastica.com/?foo=bar #}

If value is empty, it removes parameter from the URL, if already present

{{ 'http://www.sellastica.com/?foo=bar' | set_query('foo', null) }}
{# http://www.sellastica.com/ #}

You can provide more parameters at the same time by passing parameter as an array:

{{ 'http://www.sellastica.com/' | set_query({ foo: 'bar', foo2: 'bar2' }) }}
{# http://www.sellastica.com/?foo=bar&foo2=bar2 #}

remove_query

Removes query parameter from URL.

URL must be absolute.

{{ 'http://www.sellastica.com/?foo=bar' | remove_query('foo') }}
{# http://www.sellastica.com/ #}

If you do not specify any parameter, all parameters will be removed:

{{ 'http://www.sellastica.com/?foo=bar&foo2=bar2' | remove_query }}
{# http://www.sellastica.com/ #}

add_blog_tag_url

Adds tag to the blog URL.

URL parameter must be an absolute URL, but is optional. If no URL is provided, the current URL will be used.

Note that filter is functional for blog URLs only.

remove_blog_tag_url

Removes tag from the blog URL.

URL parameter must be an absolute URL, but is optional. If no URL is provided, the current URL will be used.

Note that filter is functional for blog URLs only

layout.contact_modal.title

layout.contact_modal.lead

layout.contact_modal.text