-
Notifications
You must be signed in to change notification settings - Fork 211
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace DotLiquid with Scriban templating engine #188
Comments
One more change:
|
|
For static content such us pages and blogs root routing does not work. For example we have to use '/pages/about_us' instead of '~/pages/about-us'. In that case page rendering is ok.
|
An realizaion of liquid "date" filter don't support strftime format. It is necessary to use a standard format for the .net framework. https://docs.microsoft.com/en-us/dotnet/standard/base-types/custom-date-and-time-format-strings |
The WorkContext property
It need to be replaced with
|
This is a special case of this case.
Ways to repair it.
|
Scriban do not understand HTML comment as text that don't need to be parsed. To avoid parsing such comments we need to wrap them by liquid comment tag.
|
To obtain the necessary links from |
We must to avoid a situation when a part of the liquid exspression can be |
For checking the var to
Not recommended |
Significantly changed the names of objects responsible for working with the faceted search (sidebar filters). |
Now the Json liquid filter use camalCase naming strategy instead of snake_case strategy. |
We have to write conditional expressions in one line,otherwise we will get an error "Expecting EOL" |
This issue is migrated to Wiki article How to: Migrate theme to new 4.х storefront version Released https://github.com/VirtoCommerce/vc-storefront-core/releases/tag/v4.0.0.0 |
The working branches
https://github.com/VirtoCommerce/vc-storefront-core/tree/features/scriban-migration
https://github.com/VirtoCommerce/vc-theme-default/tree/features/scriban-migration
The comparison performance benchmark
200 concurrent users. 3 minutes test duration.
The known theme breaking changes:
The specialized form tag has been removed
{% form 'login' %}{% endform %}
-><form accept-charset="UTF-8" action="{{ '~/account/login' | absolute_url }}" method="post" id="customer_login" name="customer_login"></form>
The pagination tag has been replaced to pipe function
{% paginate collection.products by 5 %}{% endpaginate %}
->{{ paginator = collection.products | paginate 20 }} {% if paginator.pages > 1 %} {% include 'pagination-custom' %}
The special variable
blank
has a new behavior{{ variable != blank }}
before equal tovariable == null OR (IEnumerable)variable.Any()
. Must be replaced to{{ variable.empty? == false }}
for collections.The 'blank' alias of 'empty' special variable scriban/scriban#107
Include statement doesn't support
{% include 'snippet' param1: aaa %}
->{% assign param1 = aaa %}{% include 'snippet' %}
{% Include %} - is it possible to create variables on the same line scriban/scriban#106
current_tags contains tag
should be replaced tocurrent_tags[tag.value].empty? == false
named arguments don't support for functions are called as pipe and by direct call
'localization_key' | t: param1 : 'a', param2: 'b'
->'localization_key' | t: 'a', 'b'
https://github.com/lunet-io/scriban/blob/master/doc/liquid-support.md#known-issues
Remove '-' from liquid operator brackets
{%- comment -%}
->{% comment %}
replaced interpolation in localization resources from Liqud expression to string format
From
en.default.json
To
The text was updated successfully, but these errors were encountered: