Search Form and Social Buttons

HotThemes Logo and Top Menu

To request a forum account, please login here and open support ticket. Only customers with active order(s) can open forum account!

× Discussion about "Sportal" Joomla template.

Topic-icon help with new mod--- needs to collapse & isnt

  • trey-braid
  • trey-braid's Avatar Topic Author
  • Visitor
  • Visitor
6 years 4 months ago - 6 years 4 months ago #2449 by trey-braid
www.beyondsportsllc.com/IFL2/

milos you helped me add this mod-- to the right of the gallery... as you can see if you go to another page---
The IFL > Team Directory: for some reason the mod doesn't collapse instead staying visible...

This is what you had me add to the index.php:

<?php if ($showuser1 or $showuser2) { ?>
<div class="gallery">
<div class="gallery_pad">
<div style="float:left"><jdoc:include type="modules" name="user1" style="xhtml" /></div>
<div style="padding-left:15px; padding-right:10px; width:265px; height:270px; background:#f60026; color:#FFF; float:left"><jdoc:include type="modules" name="news" style="xhtml" /></div>
<div class="clr"></div>

<?php if ($showuser2) { ?>
<div class="user2">
<jdoc:include type="modules" name="user2" style="xhtml" />
</div>
<?php } ?>
<div class="clr"></div>
</div>
</div>
<?php } ?>

what do i need to add so if a module is unpublished in the "news" position on a particular page it collapses...

thanks
trey
Last Edit: 6 years 4 months ago by trey-braid.

Please Log in to join the conversation.

More
6 years 4 months ago - 6 years 4 months ago #2451 by milos
Add this in the <head> area:
$shownews = $this->countModules('news');

Then add this code before/after the code that should collapse:
<?php if($shownews) { ?>
.
.
.
<?php } ?>
Last Edit: 6 years 4 months ago by milos.

Please Log in to join the conversation.

  • trey-braid
  • trey-braid's Avatar Topic Author
  • Visitor
  • Visitor
6 years 4 months ago - 6 years 4 months ago #2455 by trey-braid
i added at the end of the head and then i added the 2nd part before and after the mod...

now it dsnt appear at all; but, if i go to another page> team directory - yes it does collapse...

any idea's...

thanks again
trey
Last Edit: 6 years 4 months ago by trey-braid.

Please Log in to join the conversation.

  • trey-braid
  • trey-braid's Avatar Topic Author
  • Visitor
  • Visitor
6 years 4 months ago #2456 by trey-braid
thanks milos.... i added it in the wrong spot within the head.... i figured out the correct place within the module states code...

fixed and it is working great!!!

thanks again
trey

:cheer:

Please Log in to join the conversation.

  • trey-braid
  • trey-braid's Avatar Topic Author
  • Visitor
  • Visitor
6 years 3 months ago #2769 by trey-braid
milos this cropped up again earlier when i tried to add a module to the news position we had created--- this was the empty div you were talking about yesterday--- i somehow had deleted the script you had me add 3wks ago:

Code:
$shownews = $this->countModules('news');


Then add this code before/after the code that should collapse:
Code:

<?php if($shownews) { ?>
<?php } ?>


and this was in the index.php

<?php if ($showuser1 or $showuser2) { ?>
<div class="gallery">
<div class="gallery_pad">
<jdoc:include type="modules" name="user1" style="xhtml" />

<?php if($shownews) { ?>
<div style="padding-left:0px; padding-right:0px; width:290px; height:265px; background:#000000; float:right"><jdoc:include type="modules" name="news" style="xhtml" />
</div>
<?php } ?>
<div class="clr">
</div>


<?php if ($showuser2) { ?>
<div class="user2">
<jdoc:include type="modules" name="user2" style="xhtml" />
</div>
<?php } ?>
<div class="clr"></div>
</div>
</div>
<?php } ?>


when i publish the module instead of being side by side it is of course the opposite and stacked below it... i even played with the dimension of the hot carousel knocking down the width to 670... any idea what i am missing...

thanks again
trey

Please Log in to join the conversation.

  • trey-braid
  • trey-braid's Avatar Topic Author
  • Visitor
  • Visitor
6 years 3 months ago - 6 years 3 months ago #2776 by trey-braid
this was the website: www.govenom.com

milos any idea why it isnt working or what i might have done wrong...

thanks again
trey
Last Edit: 6 years 3 months ago by trey-braid.

Please Log in to join the conversation.

Time to create page: 0.124 seconds

Links, Partners and Social Media