Big commerce add active class using handlebar - bigcommerce

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}}

Related

How to dynamically change the style in vue single page component for templating

I want to create a SPA with the white labeling capability and I am wondering if there is a way for me to dynamically change the styles tag inside a single page VueJS component?
I think I can manage the template dynamically by using something like
<div v-if="condition"></div>
But is there similar scheme available for styles ?
Can it be done without using Server Side Rendering?

Where can I put a Django custom template tag to get it used by a customised Django admin template?

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.

Compile string with custom elements

I have an Aurelia application in which I'm trying to build a CMS component. This component will load data from the server and this data mainly contains slug, title and content fields.
I also have several global components defined in my application, and I want to be able to use those components in the server so when I pull that data my CMS component is able to transform/compile those custom elements.
An example would be a tab component. I have the tab component with this structure defined:
<tab-panel>
<tab title="First"></tab>
<tab title="Second"></tab>
</tab-panel>
The CMS component will contain a content property which I use to pass a string like this: '<tab-panel><tab title="First"></tab><tab title="Second"></tab></tab-panel>'
The component needs to compile that string and render it in its view. I've checked the enhance API, but it doesn't worked, at least for me. Any other suggestion to dynamically compile/render custom elements??
Thanks a lot in advance.
I've found the solution. I've used a compose element and InlineViewStrategy and it worked well, the components are shows and binding works as expected.
If your custom elements are registered globally using globalResources you can actually using the TemplatingEngine to dynamically insert content into the DOM and then compile it after-the-fact. This blog post goes into detail in how you can do it.
However, I would use this as a last resort. As is mostly always the case, there are much better ways to do something in Aurelia. Using the <compose> element is a great way to dynamically render content in your Aurelia applications and should always be the first port of call.

Bigcommerce Stencil custom handlebars helpers

Is it possible to write custom handlebars helpers to use within Stencil templates? If so, where should they be defined? Is there an example somewhere within the documentation?
How/Where to use Custom Handlbars Helpers in Stencil?
All the helpers are predefined that can be used with Stencil "natively". If you'd like to register your own, you'd need to include handlebars as apart of your theme and create them clientside.

how to integrate hebo html template into yii framework

how to integrate hebo html template into yii framework
I am new to using yii framework.I download hebo template from
http://www.webapplicationthemes.com/hebo-responsive-html5-theme/
I can installed template hebo but i don´t work with ie.
Don´t work fluid bootstrap.
go to views/layouts/main.php and delete html comment " <- Require the header ->" instead you can add it as php comment. This comment appears before tag and it causes IE doesn´t understand HTML5.
Did you convert the theme to work with Yii?
One of the problems with this kind of theme is that it has multiple page types and this is harder to replicate in Yii. By default, Yii has no concept of page type unless you code this into the controller using layouts ....
At the very simplest level, the conversion could be based on the fullwidth page,, converting the mainContent divs to inject $content. You would then need to change a layout to use single column ...
I've just completed this for another of their templates and it doesn't take too long - though if any one has a better idea for page types I would be very interested ....