CMS Development

Nulumia
Membre

Disable Primary Hs_Default_Custom_Style.css from blog/system pages

I noticed you can disable the Primary CSS File option for Website Pages, but cannot do so for system/error pages.

 

We have all sorts of default styling messing up our template coming from:
Coded_files/Custom/system/default/Hs_Default_Custom_Style.css

 

There is also not an option to do this for the Blog. However, our blog was designed a while back before Hubspot reworked their backend/editing structure, so I'm guessing these options have been lost since then.

 

In fact all our old archived blog and system templates from 2015-2017 have the Primary CSS file disabled but we can't find the option now.

 

Any solution? Thanks

0 Votes
3 Réponses
benvanlooy
Contributeur de premier rang | Partenaire solutions Platinum
Contributeur de premier rang | Partenaire solutions Platinum

Disable Primary Hs_Default_Custom_Style.css from blog/system pages

I also ran into this problem just now..

 

I'm creating another blog for a client, using custom coded template.

 

I have no idea where I can disable Hs_Default_Custom_Style.css - does anyone know?

 

There is actually an option in the templates

 

<!--
templateType: blog
isAvailableForNewContent: true
enableDomainStylesheets: false
label: Homepage
-->

 

but setting enableDomainStylesheets doesn't seem to do much..

0 Votes
benvanlooy
Contributeur de premier rang | Partenaire solutions Platinum
Contributeur de premier rang | Partenaire solutions Platinum

Disable Primary Hs_Default_Custom_Style.css from blog/system pages

Alright.

 

So was just in contact with support & they confirmed there isn't a way to remove this.

 

The only way is via javascript, sure not so neat, but better than nothing right?

 

(make sure jquery is loaded also)

 

      $( document ).ready(function() {
          document.querySelector('link[href$="Hs_Default_Custom_Style.css"]').remove(); 
document.querySelector('link[href$="Hs_Default_Custom_Style.min.css"]').remove(); });

added both min.css & css as min.css only gets created after a while I believe.

 

also please upvote the "idea" as otherwise this doesn't get looked at by development:

https://community.hubspot.com/t5/HubSpot-Ideas/Ability-to-remove-legacy-Hs-Default-Custom-Style-from...

JanetArmstrong
Contributeur de premier rang | Partenaire solutions
Contributeur de premier rang | Partenaire solutions

Disable Primary Hs_Default_Custom_Style.css from blog/system pages

On your templates you can choose EXCLUDE for the Domain stylesheets.

 

Then link a different one.

 

Or for global, in settings / blog / templates you can see towards the bottom where css is selected.

0 Votes