3 different english footers

Participant | Platinum Partner



I am using a global module as footer with multi-language variations. However, I would like to have 3 different english footers which is not possible in the content editor. Therefore I would like to create a custom code to apply my footers based on domains instead of hubspot automatically assigning footers to the website page based on language. So: domain.se/en would have one english footer and domain.dk/en would have a different english footer. Right now domain.se/en and domain.dk/en have the same footer due to them both being in english.


Has anyone succeded with something like this? How do i edit the code that assigns footers?

2 Replies 2

Hi @elinys, I haven't done this in a while so it might be dated but you can probably have 3 different footer modules in the design manager and then hide them on the front end using text fields.


For example, the default page template has three footers. Each footer would have inline styling similar to this:  "Style=display: {{{ module.section_footer }}};" 


On each version of the page, you would hide the menus you don't need by putting "none" in the text field. 


Let me know if this makes sense. 




Guide | Diamond Partner

Hi @elinys ,


If your footer is already a custom module, there is probably an easy solution for this.  You could create a simple if statement in your module. If you have lots of code for your footer, you could create a macro to keep it clean and readable.


{% if content.absolute_url == 'domain.se/en' %}
  // Place code for .se here
{% elif content.absolute_url == 'domain.dk/en' %}
  // Place code for .dk here
{% else %}
 // Place code for default footer here
{% endif %}


Did my answer solve your issue? Help the community by marking it as the solution.