Der Grund warum das ganze nicht mal auf IE bei mir richtig funktioniert ist folgender.
Contenido parst in meinen Quellcode im Editor diesen Code
Code: Alles auswählen
<script type="text/javascript">
/* Check if submenuItem is existing
and mark it */
if ( parent.frames["right_top"].document.getElementById("c_3") ) {
menuItem = parent.frames["right_top"].document.getElementById("c_3");
parent.frames["right_top"].sub.click(menuItem);
}
</script>
<script language="javascript">
// searches the classname in the td above or the tr above
function getCellClass(element) {
var el = document.getElementById(element);
var cell = el.offsetParent;
// if there is a classname in the td return the classname
if ( cell.className != '' ) {
return cell.className;
}
// set a flag in this td
if ( cell.id == '' ) {
cell.id = 'yes';
var flg = 'yes'
} else {
var flg = cell.id;
}
//else go to the tagname table above and search dowen for the tr tags
while (el.tagName != 'TABLE') {
el = el.offsetParent;
}
var elements = el.getElementsByTagName('TR');
//go thrue all tr tags
for (var row in elements) {
if (isNaN(elements[row])) {
var cells = elements[row].getElementsByTagName('TD');
for (var id in cells) {
if(isNaN(cells[id])){
// check if the flg(td cell) is in this tr if true return the calssname
if (cells[id].id==flg&&elements[row].className != '') {
return elements[row].className;
}
}
}
}
}
return false;
}
function setcontent(idart, act) {
var a = document.getElementsByTagName("*");
var str = '';
var aId = '';
var dcoElementCnt = 0;
// loop through all elements
for (var i=0; i < a.length; i++) {
aId = a[i].id;
aIdPrefix = aId.substr(0,4);
// search for the id which containes HTML
if (aIdPrefix == 'HTML') {
// check if its an 'contentEditable' Field
if (a[i].isContentEditable == true) {
// read out the content
var aContent = a[i].innerHTML;
// split the idname in data - datas 0 is the Fieldname 2 is the typeid
var data = aId.split("_");
if ( aContent == "" ) {
aContent = "!!";
} else {
// if there is an | in the text set a replacement chr because we use it later as isolator
while( aContent.search(/\|/) != -1 ) {
aContent = aContent.replace(/\|/,"§%%§");
}
}
// build the string which will be send
str += idart +'|'+ data[2] +'|'+ aContent +'|'+ data[0] +'||';
}
}
}
// set the string
document.forms.editcontent.data.value = str;
// set the action string
if ( act != 0 ) {
document.forms.editcontent.action = act;
}
// if there are 3 arguments, the className has to be seached
if(arguments.length > 2){
//search the class of the above element
var classname = getCellClass(arguments[2]);
if ( classname ) {
document.forms.editcontent.con_class.value = classname;
}
}
// submit the form
document.forms.editcontent.submit();
}
</script>
<script src="http://cms.kwb-elbe.de/external/mozile/mozileLoader.js" type="text/javascript"></script>
.
Ich habe in meinem Template aber den kompletten Seitenkopf also vom html bis zum Body in einem Inklude was ich mit include(blabal) einfüge.
Warum ich das mache? Ganz einfach.
Da man leider in Contenido Templates nicht verschachteln kann lagere ich alle statischen Elemente der Seite in inkludes aus. Das hat den Vorteil, dass ich nur ein einer Stelle Änderungen machen brauche und nicht an allen Templates im Contenidoeditor.
Viele Grüße
Tobi
PS:
Firefox funktioniert dennoch nicht
