You are currently viewing the BOOK: Joomla! Start to Finish: How to Plan, Execute, and Maintain Your Web Site section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
When I try to place a module, though, I'm not seeing these custom positions. Instead I'm seeing the positions (e.g., user1, user2) found in the milkway template, even though that template isn't active. I'm not being given the choice to place a module in the positions I've defined.
Anyone have any ideas? Is there something I'm overlooking?
I think I figured out the problem. In addition to the other content described on pp. 260-262, the templateDetails.xml file should include a <position> tag for each position defined in the index.php file. Details are here:
The module positions dropdown in Joomla is populated by the positions you specify in the XML file.
NOTE: Even though it's a dropdown, you CAN type right in the dropdown and specify a new module position that may not be in the XML file. That's some of the worst usability out there... but there you go!
ALSO NOTE: Creating module positions is done by the jdoc:include code, NOT by anything having to do with the XML file. You could create 10 positions in your template but not specify anything in the XML. The result would be that the dropdown may not be populated with any positions (assuming this was the only template in use on your site). However, you could type them in as they occur.
If you add a module position to your template later (either by editing your template or via the loadposition plugin, pages 175-177), you do NOT need to re-edit the XML file to include that position.
I haven't seen that particular problem before, but my guess would be that you don't have a link to the Joomla built in stylesheet:
<link rel="stylesheet" href="/templates/system/css/system.css" type="text/css" />
<link rel="stylesheet" href="/templates/system/css/general.css" type="text/css" />
Try that and see if it works. My thinking is that it's the formatting of TinyMCE that's broken rather than any actual TinyMCE functionality itself. (The functionality works since it works in MilkyWay.)
Thanks for the quick response. I've was calling the general.css file, but not the system.css file. I'm now calling both. Alas, no luck.
(By the way, the code examples on pp. 256-259 don't mention the system.css file.)
Here's the code for my main text area:
<jdoc:include type="modules" name="user2" style="xhtml" />
<jdoc:include type="message" /><jdoc:include type="component" />
<!-- end #mainContentColumn --></div>
<!-- This clearing element should immediately follow the #mainContent div in order to force the #container div to contain all child floats --><br class="clearfloat" />