PGrapes
PGrapes

Reputation: 15

Bigcommerce Stencil header image

Does Bigcommerce Stencil support a global header image?

If a user has uploaded a header image in 'store setup/design'. How can I get that image in a stencil theme?

Upvotes: 1

Views: 369

Answers (2)

Jonathan
Jonathan

Reputation: 151

On the cornerstone theme in the stencil framework, the store logo content is located in the "store-logo.html" file.

If you're developing in the stencil framework, and want to reference just the logo image use (if you want just the url for the store logo, take the handlebar from the "src" attribute):

<img class="header-logo-image" src="{{getImage settings.store_logo.image 'logo_size'}}" alt="{{settings.store_logo.title}}" title="{{settings.store_logo.title}}">

If you want to include the links and the store logo, use the following:

<a href="{{urls.home}}">
    {{#if settings.store_logo.image}}
        <img class="header-logo-image" src="{{getImage settings.store_logo.image 'logo_size'}}" alt="{{settings.store_logo.title}}" title="{{settings.store_logo.title}}">
    {{else}}
        <span class="header-logo-text">{{settings.store_logo.title}}</span>
    {{/if}}
</a>

Hope this helps!

Upvotes: 0

Alyss
Alyss

Reputation: 1866

There isn't a way to access this image within stencil at this time.

Upvotes: 0

Related Questions