there is a somewhat-related feature request submitted (to automatically create a site structure).
http://dev.cmsmadesimple.org/tracker/in ... 6&atid=104
i'm not familiar with the typo3 feature the above refers to, but i did come up with a couple of ideas...
unfortunately i am not a programmer, but perhaps this little brainstorm will give someone a place to start:
first idea:
a module to import a zip file with pre-arranged content.
filenames of zip contents would include the menu tree position and page alias. optional special tags at the beginning of each file could specify things like the page's template, title, menu text, etc. (or other page settings), and it would use pre-defined defaults if any are not present.
you'd have to strip down files to import to just the 'content' part of the pages (or create them new), (re)name them accordingly, and add extra tags as described if desired..
zip contents could look something like this:
1.home
1.1.about
1.2.contact
2.services
2.1.hosting
2.2.design
3.sales
3.1.desktops
3.2.laptops
3.3.servers
3.4.network
3.5.components
3.5.1.video
3.5.2.audio
3.5.2.storage
3.5.2.1.flash
3.5.2.2.harddrives
3.5.2.3.raid
3.5.2.4.nas
4.support
4.1.faq
5.downloads
etc. (with or without an htm or html extension. having those on the files would make them easily browsable on a local system before creating the zip file for import).
along with an included images directory
/uploads/images/
containing any images linked in the pages to be imported.
i can also see where a 'replace all' (with suitable confirmation) or 'append to end of tree' (where imported pages are added after the last existing root menu item instead of as defined in the first integer of the filename) options would come in handy.
it could also be written to handle special tags that denote where content blocks start and end, so that it could support multiple blocks on a single page if they're present.
second idea:
module to import a single html file (between the body tags), where site structure is defined by heading tags, each is a page or child page. every is a root page, underneath an and before the next is a child of that root page, underneath an starts a child of the , while an or directly under an (and before the next or ) would just be headings and content on that page..
to illustrate:
Code: Select all
</__body>
<h1>Home</h1>
<p>This is the home page</p>
<h1>Another Root Page</h1>
<!-- {page_alias="second"} -->
<p>This is another page on at the root level</p>
<h2>Child page</h2>
<p>This is a child of "Another Root Page"</p>
<h1>Third Root</h1>
<!-- {page_alias="third"} -->
<!-- {page_template="Alternate 2 column layout"} -->
<p>This is the third root menu item.</p>
<!-- {content1} -->
<p>This is a second content block on the Third Root page</p>
<!-- {/content1} -->
<h3>This is just a page heading</h3>
<p>Since there isn't an H2 preceeding this, and after the last H1, it's just a heading and content on
the page "Third Root"</p>
<h2>First child of "Third Root"</h2>
<p>This is a child page of "Third Root"</p>
<h1>This is an external Link</h1>
<!-- {external_link="http://www.cmsmadesimple.org"} -->
<h1>Fourth Root</h1>
<!-- {page_template="Alternate 1 column layout"} -->
<p>The next root page</p>
<h1>This loads some specified module</h1>
<!-- {cms_module="modulename" parameter1="something" parameter2="something else"} -->
<__body>
reasonable defaults would be used if special tags aren't present, such as auto-generating page aliases, the site default template, etc. additional tags could be used for other specific page settings (such as menu name, keywords & other meta data, etc).
this second method would enable someone to create/edit an entire site's content from a single html file using their own favorite editor on their own system. again, a 'replace all' option (with appropriate warnings & confirmation) would be a useful feature.
either of these would satisfy the request for an easy way to create an entire site structure in one go, and also to facilitate the import of existing (or newly created) static content. they could also be used as a way to update an entire existing site at once, or to create editable (and re/importable) exports/backups of an entire site's pages.