After creating and assigning a custom product page template to one of my items, the JavaScript for this page breaks. The JS removes a display:none style on the product options container. Any idea why this would happen?
Related
I have a program that essentially uses a vue template for its own rendering purposes. Basically templates are designed in Vue and pasted into a TinyMCE editor in the admin panel.
However anytime there is a bound attribute such as :src="field_name" Tiny removes the attribute completely. I am assuming this is because its not valid HTML so my question is there a setting to force Tiny to keep these attributes?
From this Shopify article Integration with the theme editor, it said that:
When merchants customize sections, the HTML of those sections is dynamically added, removed, or re-rendered directly onto the existing DOM without reloading the entire page.
JavaScript that runs when the page loads will not run again when a section is re-rendered or added to the page. This poses a problem for any custom scripts that would need to be re-run.
I am trying to use Vue 3.x in Shopify theme sections. When a section setting is changed, the section variable is changed (like {{ section.settings.button_color }}. However, the js is not run again, how can I load this updated section value into Vue app?
I am not able to find information on how to modify the main page of Vuepress, which, although I like its structure, being in .yaml format does not allow me to put links.
Is it possible to put links?
Or better, is it possible to convert that page to markdown format but keeping the output it delivers?
Unfortunately it is not possible without modifying the Vue templates. The home page is rendered by the Home component component and it renders the page's frontmatter using Vue's "Mustache" syntax. Values inside the mustaches will only ever be rendered as plain text.
You'll have to modify the Home component by either "ejecting" the default theme or by creating a custom layout for the home page. In both cases, you will obviously not receive any updates to the components anymore when you upgrade Vuepress.
I've created a demo to show how to use a custom layout to allow the frontmatter to be HTML. I've copied the Layout and Home components from Vuepress and changed the new Home component to use v-html to inject HTML values into the h1 component. So now your heroText could be Hi! This is a <a href='https://www.google.com'>link</a> and it will be displayed as a link on the home page. You could obviously do the same for the other elements.
Be sure to set the layout value of your home page to the new layout, e.g. layout: HomeLayout.
I am using the cornerstone theme and I need an active class for the current navigation. I have used the jQuery and javascript but I want to use the handlebars HTML template engine.
Yes, It is possible to Handlebar.
You can put {{is_active}} in navigation iteration loop in handlebar.
{{#if is_active}}active{{#if}}
I have a customised version of base-site.html which is kept in templates/admin.
I would like to use a custom template tag in base-site.html.
Normally I would put a custom template tag in a templatetags package within an app.
In this case, the template is rendered for the admin app, which is outside of my source tree.
Where should I put a custom template tag, so that the admin app uses it when rendering my custom base-site.html?
I just put the custom template tag in with all the application custom template tags and it worked without any trouble.