Yes, your example worked as intended. Thanks!
The reason I didn’t include them individually is that I’m using the .left-col and .right-col templates to output the same HTML around any content modules within those columns. So as an example, on one page I have:
<div class="module about">
<h1 id="hdr_welcome" class="fir">Welcome</h1>
<div class="mce-module">
About text here
</div>
</div>
<div class="module spotlights">
<h2>Featured:</h2>
<p> <ul><br />
<li><br />
./images/img_featured-1.jpg<br />
<div class="details"><br />
</p><h3><a href="#">Title of the 1st news item</a></h3>
<p> Description of the news item goes here here here here here here here here here here here here here here here here here here here here here.<br />
</div><br />
</li><br />
<li class="last"><br />
./images/img_featured-2.jpg<br />
<div class="details"><br />
</p><h3><a href="#">Title of the 2nd news item</a></h3>
<p> Description of the news item goes here here here here here here here here here here here here here here here here here here here here here.<br />
</div><br />
</li><br />
</ul><br />
</div>
Where on another page I may have two completely different modules but still need the HTML surrounding them (ie the left column HTML). What I then do is create templates for each module and then pass an array of which modules to place in each column. I’m basically trying to create a Django-like template structure, with the base template embedding either the left and right column templates or the full width template, then the column templates embed the modules that were specified in the base template.
I think I’m going to encounter issues with passing other arguments to the modules, however. As an example, if I want to have an instance of a photo module on the homepage and give it an image source different than the instance of the photo module on the about page I’d need to pass the image source and the alt text to the module. The way I’d like to do this is create an array within an array to contain variable and value pairs that are to be sent to the module. So if the photo module looks like this:
<div class="module photos">
{site_url}myerschang/images/{embed:photo-src}
</div>
then in the index template, I’d have:
{embed="myerschang/.left-col" left_col="about|photos{variables='photo-src="img_photo.jpg"|alt="Photo alt text"'}"}
and in the .left-col template I’d have:
{embed="myerschang/<?php print $value; ?>"
<?php
$variables = "{embed:variables}";
$variables = explode("|", $variables);
foreach($variables as $value)
{
print $value . " ";
}
?>}
Maybe there’s a much better way to do this, but I’d like to create only one version of each module type and pass it data specific to the page that is using it, rather than create a duplicate module with slightly different HTML for each page.