CMS Development

doroness
Membro

Adding a fixed strip on LPs

resolver

We have several LPs for various templates (some HTML + HUBL some were made via the editor). 

We want to add a fixed strip with some CTA text to all of the LPs. Is there a global way to do it, or do we need to add id for each template or each LP?

Will modifying an existing template won't cause any issues with the pages based on it?

0 Avaliação positiva
1 Solução aceita
Jake_Lett
Solução
Orientador(a) | Parceiro
Orientador(a) | Parceiro

Adding a fixed strip on LPs

resolver

Hi @doroness based on your reply I have two options you can choose from.

  1. Create a global module that you manually add to all of your templates.
  2. Add some javascript to your footer site settings to apply code to your entire site. This is a hammer approach but can work if you are good with javascript and can create rules around when your code fires. Below is an example script.
    <script type="text/javascript">
    window.addEventListener('load',
    function() {
    $('<div id="notice" style="text-align:center;position:fixed;top:0;background:#ccc;width:100%;padding:0.5rem;">This is a global notice</div>').prependTo('body');
    $( "body" ).css('padding-top',$( "#notice" ).height() );
    }, false);
    </script>

Exibir solução no post original

3 Respostas 3
Jake_Lett
Solução
Orientador(a) | Parceiro
Orientador(a) | Parceiro

Adding a fixed strip on LPs

resolver

Hi @doroness based on your reply I have two options you can choose from.

  1. Create a global module that you manually add to all of your templates.
  2. Add some javascript to your footer site settings to apply code to your entire site. This is a hammer approach but can work if you are good with javascript and can create rules around when your code fires. Below is an example script.
    <script type="text/javascript">
    window.addEventListener('load',
    function() {
    $('<div id="notice" style="text-align:center;position:fixed;top:0;background:#ccc;width:100%;padding:0.5rem;">This is a global notice</div>').prependTo('body');
    $( "body" ).css('padding-top',$( "#notice" ).height() );
    }, false);
    </script>
Jake_Lett
Orientador(a) | Parceiro
Orientador(a) | Parceiro

Adding a fixed strip on LPs

resolver

I have a few questions in order to make a definitive recommendation.

  1. Is your website and blog on the same HubSpot account?
  2. Do your landing pages share a global javascript file? Or are they a mixture (marketplace templates and custom templates)?
  3. Are these templates drag and drop or code based?

 

 

doroness
Membro

Adding a fixed strip on LPs

resolver

Hi
1. No

2. A mixture - mainly custom

3. A mixture

Thanks!

0 Avaliação positiva