-
Why did I set it in
But the edit and view icons still exist |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 5 replies
-
I think this might be needed |
Beta Was this translation helpful? Give feedback.
-
I want to find out how to edit HTML template files. |
Beta Was this translation helpful? Give feedback.
-
Hi, I assume you want to hide the code action icons on a specific page only? I don't think that is configurable via the page header. You could override the actions partial and add a test to see if the page metadata has a hide entry for actions:
Don't forget the register the overrides directory in your |
Beta Was this translation helpful? Give feedback.
-
@alexvoss I found that there is not much explanation about how to edit syntax and define variables in the official document of material. maybe I didn't find it? According to what you said above, should I learn from jinja? Is the grammar document I am looking for right here? |
Beta Was this translation helpful? Give feedback.
You don't need to define a custom template because the code I posted contains a conditional that checks the page header for each page rendered. Copy the
actions.html
from your Material install (or from here - assuming you use the latest version of Material) over to your partials directory.Then add the conditional into this. The first line in the code snippet I posted is already in the file, I posted that to show where the second line goes that tests the page header. Don't forget to close the conditional at the end with
{% endif %}
.If you want to learn how to modify the templates and partials, the place to look is the Jinja documentation. It also helps to have a good look at the template…