Reputation: 3165
I'm trying to think of a really nice way to echo the module styling for Joomla. I have:
<div class="module">
<div class="module_inner">
<h1>Some other title, eh?</h1>
Lorem ipsum dolor sit amet, consectetur adipisicing elit,
sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
</div>
</div>
<div class="module_bot"></div>
I want to output all modules with this sctructure, when a user creates a new module (HTML). The below, might get messy having multiple OR's. Messy?
<?php if ($this->countModules('module1')): ?>
// echo div structure
// echo module contents
<?php endif; ?>
Any way I can do this more Object Orientated, so I don't have alot of code on my template index.php. Possibly functions?
Just to be clear, My question is: How do I output a div structure, styling a module, with php so the user doesnt have to input the div structure in the Custom HTML module, it does it all for them -> They just type Header + Text + image.
Thanks!
Upvotes: 0
Views: 150
Reputation: 2601
You can add your own module types within your template. Looks for modules.php. You can add a new type and then use it in your main index.php template
Upvotes: 1