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
Added support for DictionaryAttributePrefix and ModelExplorer property in liquid #5099
Added support for DictionaryAttributePrefix and ModelExplorer property in liquid #5099
Conversation
Looks good to me but i would need more time, i will review it asap. There is another PR #4933 i'm working on and where i tried to improve the tag helper setters, see my comment. It is not incompatible with what you did here, but maybe better to wait for this PR in case it will be merged soon, then merge dev in your branch, then i will take the time to review this PR with you. |
…ns8482e/liquid-idictonary-support # Conflicts: # src/OrchardCore/OrchardCore.DisplayManagement.Liquid/TagHelpers/LiquidTagHelperActivator.cs
src/OrchardCore/OrchardCore.DisplayManagement.Liquid/TagHelpers/LiquidTagHelperActivator.cs
Outdated
Show resolved
Hide resolved
src/OrchardCore/OrchardCore.DisplayManagement.Liquid/TagHelpers/LiquidTagHelperActivator.cs
Outdated
Show resolved
Hide resolved
src/OrchardCore/OrchardCore.DisplayManagement.Liquid/TagHelpers/LiquidTagHelperActivator.cs
Outdated
Show resolved
Hide resolved
src/OrchardCore/OrchardCore.DisplayManagement.Liquid/TagHelpers/LiquidTagHelperActivator.cs
Outdated
Show resolved
Hide resolved
src/OrchardCore/OrchardCore.DisplayManagement.Liquid/TagHelpers/LiquidTagHelperActivator.cs
Outdated
Show resolved
Hide resolved
src/OrchardCore/OrchardCore.DisplayManagement.Liquid/TagHelpers/LiquidTagHelperActivator.cs
Outdated
Show resolved
Hide resolved
src/OrchardCore/OrchardCore.Mvc.Core/Utilities/StringExtensions.cs
Outdated
Show resolved
Hide resolved
@ns8482e just did a little review only about formatting ;) I assume you tried it, does it work as expected? |
…ns8482e/liquid-idictonary-support
@jtkech yes, It works - However I'll add some sample in demo module and update the documentation too. |
…oute-* tag helper in liquid template
@jtkech Added CRUD sample that uses liquid template in OrchardCore.Demo |
…ns8482e/liquid-idictonary-support # Conflicts: # src/OrchardCore/OrchardCore.DisplayManagement.Liquid/LiquidViewTemplate.cs # src/OrchardCore/OrchardCore.DisplayManagement.Liquid/TagHelpers/LiquidTagHelperActivator.cs
@ns8482e okay cool ;) I will take a look tomorrow |
src/OrchardCore.Modules/OrchardCore.Demo/Controllers/TodoController.cs
Outdated
Show resolved
Hide resolved
src/OrchardCore.Modules/OrchardCore.Demo/Controllers/TodoController.cs
Outdated
Show resolved
Hide resolved
src/OrchardCore.Modules/OrchardCore.Demo/Controllers/TodoController.cs
Outdated
Show resolved
Hide resolved
@jtkech @agriffard @Skrypt Updated document for liquid |
Works - No error |
I'm working on it and i did some updates that i will commit tomorrow as i have to use the web interface file by file (would be good to add my github user to your repo if not already done). Here some comments on the main changes
I will commit them tomorrow so that you will be able to see them more in details and do a review. |
@jtkech you removed LastIndexOfAny so I guess route-todoid will not longer work as now it’s only looking for _ so route_todoid is only valid. You may need to update docs for the same |
Yes for perf reasons and it simplified the code, i already updated the doc accordingly e.g to use |
Forgot to say that i changed the Also having an identifier relying on the position of the list may create conflicts after removing / adding items. So i used an |
{% endform %} | ||
``` | ||
|
||
In following example, `route-todoid` adds `Model.TodoId` to hyperlink. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
route_todoid
In following example, `route-todoid` adds `Model.TodoId` to hyperlink. | ||
|
||
```liquid | ||
{% a action: "Delete" , controller: "Todo", class: "btn btn-danger", route-todoid: Model.TodoId %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
route_todoid
|
||
```liquid | ||
{% a action: "Delete" , controller: "Todo", class: "btn btn-danger", route-todoid: Model.TodoId %} | ||
{% a action: "Delete" , controller: "Todo", class: "btn btn-danger", route_todoid: Model.TodoId %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch 👍
@jtkech Any other suggestions or concerns for this PR ? |
LGTM but because |
as per comments on thread
#5094 (comment)
Now, in liquid, defining following is possible,
And
Also Fixes #4426
Fixes #2740
/cc @jtkech