ich bin auch mal wieder ein Neuling in sachen Contenido und hab folgendes Problem.
Ich möchte im Content Bereich unter einem Artikel mehrere Klapptexte platzieren, die ich dann auch im Editor bearbeiten kann.
Soweit ich jetzt Contenido verstanden habe, muss ich ja das Ganze in verschiedene Bereiche auflösen.
ich vermute dass ich ein Module und ein Template erstellen muss. Das javascript kann ich vermutlich in den js Ordner schieben und in meinem Layout darauf verweisen.
Mir ist nun nur nicht klar, wie das Modul beschrieben sein muss.
Hier ist mal mein HTML Code mit dem javascript, so wie das Teil funktionieren soll
Code: Alles auswählen
<head>
<script type="text/javascript">
function show(divid) {
d=document;
d.getElementById("cat1").style.display="none";
d.getElementById("cat2").style.display="none";
d.getElementById(divid).style.display="block";
}</script>
</head>
<body>
<div style="border: 1px solid #00315c; padding: 0px; background: #ffffff; width:496px; font-family:Verdana, Arial; font-size:12px ">
<table border="0" cellspacing="0" cellpadding="2" width="496" style="background: #000000; color: #FFFFFF; ">
<tr>
<td colspan="2" style=" padding: 05px; width:496px; font-family:Verdana, Arial; font-size:12px; font-weight:bold; background-image:URL(bilder/info_balken.jpg);background-repeat:no-repeat;" >
<a title="show/hide" id="" href="javascript: void(0);" onClick="show('cat1');" style="text-decoration: none; color: #FFFFFF; font-weight:bold">
Titel 1</a></td>
</tr>
</table>
<div id="cat1" style="padding: 13px;display:none; text-align:justify">Text1</div>
</div>
<br/>
<div style="border: 1px solid #00315c; padding: 0px; background: #ffffff; width:496px; font-family:Verdana, Arial; font-size:12px ">
<table border="0" cellspacing="0" cellpadding="2" width="496" style="background: #000000; color: #FFFFFF; ">
<tr>
<td colspan="2" style=" padding: 05px; width:496px; font-family:Verdana, Arial; font-size:12px; font-weight:bold; background-image:URL(bilder/info_balken.jpg);background-repeat:no-repeat;" >
<a title="show/hide" id="" href="javascript: void(0);" onClick="show('cat2');" style="text-decoration: none; color: #FFFFFF; font-weight:bold">
Titel2</a></td>
</tr>
</table>
<div id="cat2" style="padding: 13px;display:none; text-align:justify">
Text2
</div>
</div>
<br/>
</body>