Developer forum

Forum » Swift » Pages with different headers

Pages with different headers

Tomas Gomez
Reply

Hi,

In Swift, how do you configure different headers to different pages? It is easy to duplicate a header but I cannot ascertain how to apply the new header to certain pages.

Regards,
Tomas


Replies

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

Please define what a header is in this context.

Thanks, Nicolai

 
Nuno Aguiar Dynamicweb Employee
Nuno Aguiar
Reply
This post has been marked as an answer

Hi Tomas,

 

We've had a project where the customer wanted to have a different header on the Homepage vs the rest of the website. Is that along the lines of what you need?

 

If so, you can do a simple customization:

  • Add fields for page selection in the PageProperties Item type
  • In the Master template check if there's any value in them, and if so, use it, otherwise use the generic header instead

 

In our example we did it for both Header and Footer in both Desktop and Mobile, thus ensuring any variantion the customer was sending our way. And in our case, we can apply it to any page, but as far as I know, the customer is only doing that for the homepage for now.

 

 

 

Best Regads,

Nuno Aguiar

Votes for this answer: 1
 
Tomas Gomez
Reply

That's exactly what I was looking for. 

Simple and clean, thanks a lot, Nuno :-)

Regards,
Tomas

 

You must be logged in to post in the forum