-
AuthorPosts
-
jscarfe Friend
jscarfe
- Join date:
- December 2012
- Posts:
- 22
- Downloads:
- 0
- Uploads:
- 2
- Thanks:
- 13
- Thanked:
- 4 times in 1 posts
February 7, 2014 at 10:54 pm #194590I’m trying to add something like a mass-top module inside the Main Content section of a block (an example being “one-sidebar-right.php”. I’ve added a new position called “custom” in the TemplateDetails XML file and have added to following code to the php file:
[PHP] <!– MAIN CONTENT –>
<div id=”t3-content” class=”t3-content col-xs-12 col-sm-8 col-md-9″><?php if ($this->countModules($custom)) : ?>
<!– CUSTOM –>
<div class=”custom”>
<jdoc:include type=”modules” name=”<?php $this->_p($vars[‘custom’]) ?>” style=”T3Xhtml” />
</div>
<!– //CUSTOM –>
<?php endif ?><?php if($this->hasMessage()) : ?>
<jdoc:include type=”message” />
<?php endif ?>
<jdoc:include type=”component” /></div>
<!– //MAIN CONTENT –>[/PHP]I’ve created a custom html module using the “custom” position, but the module isn’t showing on the page. I’m guessing I’m missing a step somewhere. Any guidance would be greatly appreciated!
Thanks in advance!
Scott Lavelle FriendScott Lavelle
- Join date:
- November 2010
- Posts:
- 266
- Downloads:
- 16
- Uploads:
- 5
- Thanks:
- 6
- Thanked:
- 64 times in 27 posts
February 8, 2014 at 3:46 am #521801When I add an extra position, I usually have a line that looks like this:
<jdoc:include type="modules" name="<?php $this->_p('header-info') ?>" style="raw" />
In your example, what is the $vars part?
Scott Lavelle - Technical Resource Solutions, LLC
Certified Joomla Administratorjscarfe Friendjscarfe
- Join date:
- December 2012
- Posts:
- 22
- Downloads:
- 0
- Uploads:
- 2
- Thanks:
- 13
- Thanked:
- 4 times in 1 posts
February 8, 2014 at 4:37 pm #521840Perfect! Your code did the trick! The one thing I’m still unsure about is how to include the module’s title.
Scott Lavelle FriendScott Lavelle
- Join date:
- November 2010
- Posts:
- 266
- Downloads:
- 16
- Uploads:
- 5
- Thanks:
- 6
- Thanked:
- 64 times in 27 posts
February 8, 2014 at 5:15 pm #521847You should be able to do that at the module itself. In the module config, there is an option for show or don’t for the module Title. In Joomla 3.2.1, this option is on the Module tab on the top of the far right and says “show title” with options for show or hide.
Does that help?
Scott Lavelle - Technical Resource Solutions, LLC
Certified Joomla Administratorjscarfe Friendjscarfe
- Join date:
- December 2012
- Posts:
- 22
- Downloads:
- 0
- Uploads:
- 2
- Thanks:
- 13
- Thanked:
- 4 times in 1 posts
February 8, 2014 at 6:36 pm #521861Yup. The module’s title is published. If it helps, this is regarding the t3_bs3 template.
Scott Lavelle FriendScott Lavelle
- Join date:
- November 2010
- Posts:
- 266
- Downloads:
- 16
- Uploads:
- 5
- Thanks:
- 6
- Thanked:
- 64 times in 27 posts
February 8, 2014 at 9:15 pm #521866Hmmm. I haven’t been using the t3-bs3 template yet except for on one test site. I have been trying to catch up on some sites that I have already started with the previous bs2 template and, if you haven’t noticed, you can’t just switch templates in the middle without doing some work to convert. I’ll try to take a look at the test site I have and see if I can find what the issue is.
Do you have a public link to the site you are working on?
Scott Lavelle - Technical Resource Solutions, LLC
Certified Joomla Administratorjscarfe Friendjscarfe
- Join date:
- December 2012
- Posts:
- 22
- Downloads:
- 0
- Uploads:
- 2
- Thanks:
- 13
- Thanked:
- 4 times in 1 posts
February 8, 2014 at 10:01 pm #521867I’m just testing on a local wamp. I’ll keep digging as well, and thanks for checking when you have a moment.
Scott Lavelle FriendScott Lavelle
- Join date:
- November 2010
- Posts:
- 266
- Downloads:
- 16
- Uploads:
- 5
- Thanks:
- 6
- Thanked:
- 64 times in 27 posts
February 8, 2014 at 10:31 pm #521869for what it’s worth, I just recreated my test container and the module title worked as I expected it to. In this case, I just created a single Position1 module and have it showing on the home page right under the main menu. The ability to turn on and of the module title worked as expected as described above.
Scott Lavelle - Technical Resource Solutions, LLC
Certified Joomla Administrator1 user says Thank You to Scott Lavelle for this useful post
jscarfe Friendjscarfe
- Join date:
- December 2012
- Posts:
- 22
- Downloads:
- 0
- Uploads:
- 2
- Thanks:
- 13
- Thanked:
- 4 times in 1 posts
February 8, 2014 at 10:44 pm #521870I found the issue. I updated the jdoc style to “T3Xhtml” from “raw” and the title is now showing. Thanks again for all your help!
Scott Lavelle FriendScott Lavelle
- Join date:
- November 2010
- Posts:
- 266
- Downloads:
- 16
- Uploads:
- 5
- Thanks:
- 6
- Thanked:
- 64 times in 27 posts
February 8, 2014 at 10:46 pm #521871Yeah – I’ve not really tried to understand the different options there, whether T3Xhtml or raw or whatever. If someone wants to chime in, it would be helpful to the community.
Scott Lavelle - Technical Resource Solutions, LLC
Certified Joomla Administrator -
AuthorPosts
This topic contains 10 replies, has 2 voices, and was last updated by Scott Lavelle 10 years, 9 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum