Skip to content
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

Use data-sly-unwrap to Avoid Code Duplication #113

Open
piotr-wilczynski opened this issue Oct 24, 2018 · 0 comments
Open

Use data-sly-unwrap to Avoid Code Duplication #113

piotr-wilczynski opened this issue Oct 24, 2018 · 0 comments
Assignees
Labels
htl Issues related to HTL language rule New rule or modification of existing one.

Comments

@piotr-wilczynski
Copy link
Contributor

Remember that you can use data-sly-unwrap. A lot of code can be saved by using it proficiently.

<!--/* Bad */-->
<a href="${model.url} data-sly-test="${model.url}">${model.text}</a>
<sly data-sly-test="${!model.url}">${model.text}</sly>
 
<!--/* Good */-->
<a href="${model.url} data-sly-unwrap="${!model.url}">${model.text}</a>
@piotr-wilczynski piotr-wilczynski added rule New rule or modification of existing one. htl Issues related to HTL language labels Oct 24, 2018
@piotr-wilczynski piotr-wilczynski self-assigned this Oct 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
htl Issues related to HTL language rule New rule or modification of existing one.
Projects
None yet
Development

No branches or pull requests

1 participant