English 中文(简体)
best practice to integrate web parters html header and footer
原标题:
  • 时间:2010-07-22 14:03:31
  •  标签:
  • branding

Let s say you want to work with a lot of parters and customize your website for them. The constraints are

  1. they want to have their own
    • HEAD-information (javascript, css, sometimes title & meta)
    • body header
    • body columns (right or left)
    • body footer
  2. they want to be able to modify header/footer often
  3. iframe is not an option

what would be a good way to do that ?

Thank you

最佳回答

Have you considered a template engine? The MVC (model-view-controller) pattern, sometimes also called view-model-template, is quite popular along web projects. Assuming a good template engine (you haven t mentioned a technology, so i can t recommend a specific one), it will be possible to inherit from templates and override or extend those blocks you want to change. So it will be easy to modify any block (e.g. header/footer/content/sidebar/...) you want. The layout is completely separated from the controller behind.

Those template engines I know all have a configurable load-path for their templates. So one good solution might be to create separate folders for each individual layout and add one of them (depending on the request) in front of the default load path. If there is a template in the individual-layout folder it will be used (which might then extend the default one), otherwise the default template will be used. But the concept might differ, depending on the template engine you use.

If you really want to only add headers and footers, something likes Apache s mod_layout might suit you, but it seems not to be very popular anymore and you might exceed its limits soon. Unique web designs has become more important over the last years, and just changing the header is often not enough anymore. So, the best-practice is in my opinion clearly a good template engine.

问题回答

暂无回答




相关问题
Silverlight: branding/design and navigation

I have some years exprience with ASP.NET, but I am new to Silverlight. I have a basic question regarding the design and navigation of a Silverlight page/application ? If a Silverlight project is ...

White Labeling Provider Advice

I ve developed a website that provides a fairly basic service. Users register, fill in online forms, make a payment and then generate some pdf documents based on the data in the forms. They can log in ...

Sharepoint Branding

I m just tasked by my boss to create a Sharepoint solution for the scenerio below. (I m a total newbie to Sharepoint. So please forgive me if i use the terminology wrong) The portal should open in a ...

热门标签