Hi All,
I've managed to code a simple mod for Etomite, which allows documents to be inside folders like so:
http://yoursite.com/Folder/document.html
You can see it in action at the temporary URL: http://eto.vorxhost.com
One problem though, I'm not sure how to make links outside 'Folder' change back to their normal link (http://yoursite.com/document.html), so if anyone has any ideas, I'd be very grateful
Below is the code for anyone that's interested:
This adds the document parent alias to the URL, if it's a folder, otherwise it's a normal document. (Note: you have to edit a document and save for it to work).
// processors/save_content.processor.php
// Line 30:
if ($isfolder == 0){
$sql = "SELECT alias FROM $dbase.".$table_prefix."site_content WHERE $dbase.".$table_prefix."site_content.id = $parent;";
$rs = mysql_query($sql);
$docaliasprefix = mysql_fetch_assoc($rs);
$alias = $docaliasprefix['alias'].'/'.$alias;
}This removes the folder/ alias when editing the document, so it doesn't duplicate it:
// actions/dynamic/mutate_content.dynamic.action.php
// Line 100:
list ($folder, $document) = explode ('/', $content['alias']);
$content['alias'] = $document;Note:
The same thing happens with the URLs if you change a document's alias to Folder/document rather than using the code above.











