Hi Sean,
Thanks a lot for replaying!
Sorry for not getting back to you earlier but i was on short holidays.
I've deleted all of the small images (.png 19x19) and used html entities instead and the page saves.
My custom code in:
Download.php
<?php
class Downloads extends SiteTree {
static $db = array(
'ServicePacks' => 'HTMLText',
'CADRasterDownloads' => 'HTMLText',
'HyperDocDownloads' => 'HTMLText',
'SuperEditDownloads' => 'HTMLText',
'OtherDownloads' => 'HTMLText'
);
static $has_one = array(
);
function getCMSFields() {
$fields = parent::getCMSFields();
$fields->addFieldToTab('Root.Content.Main', new HTMLEditorField('ServicePacks', 'ServicePacks tab'));
$fields->addFieldToTab('Root.Content.Main', new HTMLEditorField('CADRasterDownloads', 'CADRasterDownloads tab'));
$fields->addFieldToTab('Root.Content.Main', new HTMLEditorField('HyperDocDownloads', 'HyperDocDownloads tab'));
$fields->addFieldToTab('Root.Content.Main', new HTMLEditorField('SuperEditDownloads', 'SuperEditDownloads tab'));
$fields->addFieldToTab('Root.Content.Main', new HTMLEditorField('OtherDownloads', 'OtherDownloads tab'));
return $fields;
}
}
class Downloads_Controller extends ContentController {
function init() {
parent::init();
}
}
?>
and part of Download.ss is:
<ul id="tabs">
<li><a href="#" name="tab1">Latest versions</a></li>
<li><a href="#" name="tab2">Service Packs</a></li>
<li><a href="#" name="tab3">CADRaster</a></li>
<li><a href="#" name="tab4">HyperDoc</a></li>
<li><a href="#" name="tab5">Super Edit</a></li>
<li><a href="#" name="tab6">Other</a></li>
</ul>
<div id="tab-content">
<div id="tab1"><br />$Content</div>
<div id="tab2"><br />$ServicePacks</div>
<div id="tab3"><br />$CADRasterDownloads</div>
<div id="tab4"><br />$HyperDocDownloads</div>
<div id="tab5"><br />$SuperEditDownloads</div>
<div id="tab6"><br />$OtherDownloads</div>
with some script to it in the header:
<script type="text/javascript" src="$ThemeDir/js/jquery-latest.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$('#tab-content').children('div').hide(); // Initially hide all content
$("#tabs li:first").attr("id","current"); // Activate first tab
$("#tab-content div:first").fadeIn(); // Show first tab content
$('#tabs a').click(function(e) {
e.preventDefault();
if ($(this).closest("li").attr("id") == "current"){ //detection for current tab
return
}
else{
$('#tab-content').children('div').hide(); //Hide all content
$("#tabs li").attr("id",""); //Reset id's
$(this).parent().attr("id","current"); // Activate this
$('#' + $(this).attr('name')).fadeIn(); // Show content for current tab
}
});
});
</script>
If I run into this problem again (maybe if I add more content) i will debug this.
Also, thanks for the tip with server name.
I think it helped and pages load faster :)