How to insert custom template to a static page?
This is an open discussion with 2 replies, filed under General.
Search
It does largely depend on how you've set up everything. What I do in that case is the following:
- Create the content in the section as usual (you'll need this for content blocks SEO etc)
- Create a "NEW" Symphony page where you can put your custom parts of the template
- Include the static page datasource and make a url param fallback
{$static-page-variable:$current-page}
so if your static page variable does not exist it would load the current page template.
In my opinion that's the neatest way to do it. Another alternative could be (if you use "/data" to match) is to add an additional match template as follows.
match="/data[static-page/entry/title/@handle='my-custom-page']"
Where my-custom-page
is replaced by the respective page handle.
What I do in some case, for example inserting forms:
<xsl:template match="p[starts-with(text(), '[your-trigger text here]')]" mode="html" priority="1"> <xsl:call-template name="your-custom-template "/> </xsl:template>
In your static html just place <p>[your-trigger-text-here]</p>
Create an account or sign in to comment.
My website has some static pages, such asABOUT SERVICER SOLUTIONS. Generally, a static page is a text area by URL filtering, but sometimes this does not generate some more diverse styles and how we can insert custom template to a static page?