开发者

Drupal Publishing

开发者 https://www.devze.com 2023-03-15 11:08 出处:网络
I\'m new to web design. I basically just jumped into this learning as I went. People recommended CMS\'s like Joomla & Drupal and I installed them spent a few hours trying to figure them out and ga

I'm new to web design. I basically just jumped into this learning as I went. People recommended CMS's like Joomla & Drupal and I installed them spent a few hours trying to figure them out and gave up. I then proceeded to just design my web site in a text editor b/c it was easier just to learn html, css, js, etc. Well now I've got somewhere between 20 & 30 webpages I need to get published to the web. I have three CMS's installed on my hos开发者_JAVA技巧t server and I've sort of decided to use drupal. So I've got drupal open and the example drupal home page. I can not figure out how to just change that page to my html page I've already created.

I feel like this is such a stupid question but I have googled myself into carpal tunnel. Can someone point in the right direction?


You can do this very easily by using a PHP snippet in the article, blog entry or whatever. You need to activate the PHPfilter module, and to make sure that the content type you are working with accepts PHP code... and that you as a Drupal user is allowed to use PHP code.

Otherwise, its simple, put something like this in the body of the content:

<?php
print file_get_contents("/path/to/file.html");
?>


A CMS does not manage html pages, it manages content. In case of Drupal, content is nodes, blocks, users, ...

The next important thing in a CMS/Drupal is separation of content and design. With a CMS like Drupal, you create/use a so called theme, which is a template for your content that defines HTMl structures, CSS and so on. That is more or less the same for all pages of a website.

Once you have that, the advantage of a CMS kicks in. You can now create content, as much as you want (more or less) and it will all be displayed using that previously created/downloaded theme. Without having to write HTML/CSS for every new page. And you can change your design/structure in a single place, and every single page of your website will be affected at the same time.

As you can see, that is completely different from what you have done with static HTML files. Which also means, that there is no easy way to "import" it into Drupal. You basically have to re-create the complete site, this time with using Drupal, and then add your content to it. And you will have to learn Drupal while doing that.

So, when you are finished with your website as static pages, just upload them to a hoster and be done with it. And maybe start with a CMS from the beginning with the next project...

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号