Stäng
Ditt användarnamn måste innehålla minst 4 bokstäver Var vänlig och ange en giltig e-postadress Var vänlig ange ett lösenord Ange en betanyckel

OBS. Hemsida Online är i betafas och kräver därför en betanyckel för att kunna skapa en egen webbplats.

Stäng
Ditt användarnamn måste innehålla minst 4 bokstäver Var vänlig och ange en giltig e-postadress Var vänlig ange ett lösenord Ange en betanyckel

OBS. Hemsida Online är i betafas och kräver därför en betanyckel för att kunna skapa ett utvecklarkonto.

Dokumentation

Use these tags in your templates. If you don´t know liquid jet, learn liquid here.

Liquid tags to use in HemsidaOnline

Use these tags in your templates. If you don´t know Liquid jet, learn Liquid here.

TagDescription
{{site_logo}} Url to logotype
{{site_title}} Site title text
{{site_description}} Site description text
{{site_footer_text}} Site footer text
{{stylesheet}} Url to stylesheet
{{stylesheet_responsive}} Url to responsive stylesheet
{{body_class}} Default body CSS-classes generated by HemsidaOnline
TagDescription
{{page}} Object containing information about current page

page.id
page.name
page.title
page.url
page.images
page.options
page.comments
page.comment_status
page.post_type
page.content
page.created
page.creator_name
page.is_start_page
{{page_meta_keywords}} Keywords for the current page
{{page_meta_description}} Description for the current page

Add widgets to a page

You can add widgets to a page by using these tags. Instance is optional.


TagDescription
{% widget %}
{
    "name": "textcontent",
    "instance":
    {
        "text":"Hej!"
    }
}
{% endwidget %}
Add a text content widget
{% widget %}
{
    "name": "image",
    "instance":
    {
        "title":"Titel",
        "image":"/assets/image.jpg",
        "caption":"Hej!",
        "photobyline":"Hej!"
    }
}
{% endwidget %}
Add a image widget
{% widget %}
{
    "name": "teaser",
    "instance":
    {
        "title": "Titel",
        "text": "Text",
        "image": "/assets/image.jpg",
        "link": "#",
        "link_text": "Läs mer"
    }
}
{% endwidget %}
Add a teaser widget
{% widget %}
{
    "name": "slider",
    "instance":
    {
        "items":
        [
            {
                "heading": "Rubrik",
                "text": "Text",
                "image": "/global/images/slide/1.jpg",
                "link": "#",
                "link_text": "Läs mer"
            },
            {
                "heading": "Rubrik",
                "text": "Text",
                "image": "/global/images/slide/2.jpg",
                "link": "#",
                "link_text": "Läs mer"
            }
        ]
    }
}
{% endset_widget %}
Add a slider widget
TagDescription
{{post}} Object containing information about current post

post.id
post.name
post.title
post.url
post.images
post.options
post.comments
post.comment_status
post.post_type
post.content
post.created
post.creator_name
{{posts}} Collection of posts
{{post_categories}} Collection of categories
{{term}} Current term object. A term can be a category, collection, tag etc.

term.id
term.name
term.description
term.url
term.image
term.slug
term.posts
term.tags
term.taxonomy
TagDescription
{{product}} Object containing information about current product

product.id
product.name
product.title
product.url
product.images
product.options
product.comments
product.comment_status
product.post_type
product.content
product.created
product.creator_name
product.variation_images
product.variation_products
product.variation_lists
{{products}} Collection of products
{{related_products}} Gets the related products for current product
{{product_collections}} Collection of product collections
{{current_category_tag}} Get current tag in current category
{{term}} Current term object. A term can be a category, collection, tag etc.

term.id
term.name
term.description
term.url
term.image
term.slug
term.posts
term.tags
term.taxonomy
TagDescription
{{post}} Object containing information about current post

post.id
post.name
post.title
post.url
post.images
post.options
post.comments
post.comment_status
post.post_type
post.content
post.created
post.creator_name
{{posts}} Collection of posts
{{term}} Current term object. A term can be a category, collection, tag etc.

term.id
term.name
term.description
term.url
term.image
term.slug
term.posts
term.tags
term.taxonomy
{{'taxonomy' | get_terms}}

Collection of terms. Gets all terms under requested taxonomy.

Parameters:
options
{
    "post_id": id
}

{{current_category_tag}} Current tag in current term tags
TagDescription
{{virtual_theme_path}} Path to current theme
{{current_user}} Object containing information about current user
{{is_logged_in}} (Boolean) Returns true if user is logged in
{{current_term}} Object containing information about current term
{{edit_posts_id}} Use this to enable inline editing
{{edit_comments_id}} Use this to enable inline editing

Tags are used for the logic in your template.

Also see Liquid default tags here.

TagDescription
{% get_template_part 'file' %}         Gets the requested file from the current partials directory.
Example:
{% get_template_part 'product-list' %}
If you are on a list page then the file is retrieved from the current list page partials directory.
If you are on a page then the file is retrieved from the root partials directory.
If you are in a plugin directory then the file is retrieved from the plugin partials directory.
{% sidebar 'sidebar_name' %}
{
    "global": false,
    "static": false
}
{% endsidebar %}

Include a sidebar area on a page.
Default sidebar names:
main-content
sidebar-1
sidebar-2
sidebar-1-of-2
sidebar-2-of-2
sidebar-1-of-3
sidebar-2-of-3
sidebar-3-of-3
sidebar-1-of-4
sidebar-2-of-4
sidebar-3-of-4
sidebar-4-of-4

Options: global and static

{% render_page_layout 'partial_file' %} Render page layout renders all sidebars on a page. You can include a partial file. That file will be rendered in the main content sidebar

Add sidebars to a page

You can add a sidebar to a page using the sidebar tag. Global and static is optional.

<div class="row-fluid">
    <div class="span3">
{% sidebar %}{"name": "sidebar-1-of-4"}{% endsidebar %} </div> </div> <div class="row-fluid"> <div class="span3"> {% sidebar %}{"name": "sidebar-2-of-4"}{% endsidebar %} </div> </div> <div class="row-fluid"> <div class="span3"> {% sidebar %}{"name": "sidebar-3-of-4"}{% endsidebar %} </div> <div class="row-fluid"> <div class="span3"> {% sidebar %}{"name": "sidebar-4-of-4"}{% endsidebar %} </div> </div>

 

Add widgets to a page

You can add widgets to a page using the widget tag. Instance is optional.

<div class="row-fluid">
    <div class="span12">
        {% widget %}{"name": "slider"}{% endwidget %}
    </div>
</div>
<div class="row-fluid"> <div class="span12"> {% widget %}{"name": "introduction"}{% endwidget %} </div> </div>
<div class="row-fluid"> <div class="span12"> {% widget %}{"name": "postlist"}{% endwidget %} </div> </div>