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

How to override template of snippet? #7

Open
elceka opened this issue Apr 25, 2020 · 2 comments
Open

How to override template of snippet? #7

elceka opened this issue Apr 25, 2020 · 2 comments

Comments

@elceka
Copy link

elceka commented Apr 25, 2020

Hi,
please, how i can override snippet template?
I know, snippet template is same as the component template, overriding template is working for component (in the theme partials folder) but it is not working for snippet, snippet still use not overriding template of the plugin.
I think, this is not a issue of your's plugin, but maybe you can me help with it...
Thank you.

@elceka
Copy link
Author

elceka commented Apr 25, 2020

OK, I have it.
We can use plugin component in our snippet created from partial view.
Bud in the template file default.html is a bug, because shows only all opening hours. If you have selected slug of one opening hour location it doesn't matter.

Sample code of snippet created from partial view:

[viewBag]
snippetCode = "exam-times"
snippetName = "Exam times"
snippetProperties[slug][title] = "Code of exam times"
snippetProperties[slug][type] = "string"
snippetProperties[slug][default] = ""
snippetProperties[slug][options][] = ""

[openingHours]
slug = "{{slug}}"
==
{% component 'openingHours' %}

@tobias-kuendig
Copy link
Member

Bud in the template file default.html is a bug, because shows only all opening hours. If you have selected slug of one opening hour location it doesn't matter.

Sorry, I don't understand this error description. What does work and what doesn't?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants