Is there a way to create node from existing HTML page by just uploading it. I know that using correct input filters I can enter HTML content while editing a node. But what if I have a complex HTML (for example, I have saved an Excel sheet as HTML with a lot of formatting) and I want this page to appear in place of node body. All other elements of my Drupal site should stay in their places (header. side blocks, footer, etc.) and only in the node body area my HTML page should be rendered. How can I achieve that?

Thanks!

Comments

vonny007’s picture

I would suggest using cck and creating the necessary fields for that content type and then create node-(type).tpl.php file for that type of node eg- node-excel.tpl.php (this should go into your theme folder).

Or maybe you can create a node page and make sure you have set to 'full html' and insert inline css to recreate it?

Hope this helps

tentonjim’s picture

If the html is very complex set the input format to php and call an include file there in the body textarea. Much easier to edit [complex] html in a text editor than from within Drupal. Just use the specific html you need... like starting at a div or whatever instead of the whole html > head > body routine, and then style accordingly. You can style it inline or just add it to your main css file.

Hope this helps. Wouldn't say it's the right way to use Drupal... but I know I have been asked (by people that pay my salary) to do one off type things that are just easier to do it this way.

mvidelgauz’s picture

Thank you for these suggestions.

They look like exactly what I was looking for!!!