Importing HTML Files

Hi

I have a whole bunch of HTML files from a legacy site that I'd like to import.

The "upload" option in Admin->Pages doesn't seem to do this - I get and error say that file type is not allowed.

Is it possible to do this with the existing Admin or do I need to write something that will do it for me?

TIA

Comments

  • edited 8:48PM
    The upload function is intended for uploading CI view files. Your layout needs to have a field of "body" for it to work. That looks to be a bug, which I'll post a fix for shortly in the develop branch (the next patch release of FUEL).
  • Ah. OK. So which bit of this is buggy? The fact I can't upload HTML or the (incorrect) error message? Should I expect to be able to import my HTML or should start planning on writing something?

    Cheers
  • edited 8:48PM
    The buggy part is that you should be able to upload HTML files but you can't (only .txt and .php). I pushed a change to the develop branch yesterday which you can pull from that should allow you to upload html files.
  • Makes sense now. Thanks.

    I pulled your changes into my 1.05 install (not the whole development branch) but still get the file type error - and the codeigniter upload function fails. If I edit your code and change "php|html|txt" to "*", the codeigniter upload works but I get a new Fuel error saying there was a problem uploading the file. If I move the file into the views directory, it works (with "*" but not "php|html|txt"). It's not quite doing what I expected - which is my fault, not fuel's so...

    Given the number of pages I have to import (and sanitise en-route), I've started writing my own importer which squirts straight into fuel_pages and fuel_page_variables...
  • edited 8:48PM
    Actually, uploading a non-view file won't work. The upload functionality is only meant for view files.
  • Cheers. I kind-of worked that out after playing. There are a few Fuel CMS reviews on the 'net that sort of implies otherwise and the Fuel CMS docs don't categorically debunk that assertion. It would be a very cool feature to have though ;)
Sign In or Register to comment.