0

I have a drupal 7 driven website. I need to replace a handful of pages on that website using static HTML without impacting the URLs of those pages.

For example I have a page accessible at: example.com/services/ That page is a proper drupal driven page. I want that page to display a proper HTML page I've written from scratch without any input from drupal engine but still retain the same URL so anything that leads to that page (internal & external links) would continue to work.

What's the correct way to set that up. Thank you!

  • 2 ways. 1.- place your html in body and set full HTML, 2.- override tpl.php template – pinueve Oct 27 '17 at 14:56
  • thanks for your suggestion. Looking into it now I realized that these are not "pages" but some custom content types called "service". – equinoxe5 Oct 27 '17 at 15:25
  • If you are able, I would recommend creating the page(s) in a custom module for full control. It really depends on whether or not you are utilizing drupal regions or if the page is 100% custom HTML. – erier Oct 27 '17 at 17:41
  • The replacement pages are 100% custom HTML. I ended up using this module to achieve what I need: drupal.org/project/static_page – equinoxe5 Oct 27 '17 at 21:55
0

lets say your url is : example.com/services , and services is 1 content type of drupal , and if you want to replace whole page with static html them create services.html page on root folder of your drupal and add whole html inside it and then run url it will display only html added in that html file.

Note : this html file name must be same as url , if url is example.com/abc then file name should be abc.html

Hope this helps you.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.