Keyword
Please note that official support for commercial extensions & templates is provided in the Subscriber Help Desk.
Support requests should ONLY be directed there and require an active subscription plan.
This forum board is to be used for archive purposes and knowledge exchange ONLY.

Hide contentbox when empty

  • sorlia
  • sorlia's Avatar Topic Author
  • Offline
  • New Member
More
12 years 10 months ago #45308 by sorlia
Hide contentbox when empty was created by sorlia
Hi

For a Joomla site I am creating I am using the slideshow on the frontpage to show images. Some images should have some text with them, others should not. To not get the text to show is easy, as it is just a setting. But the transparent box displays if there is content or not.

I have tried to change it in the default.php of the theme I'm using. I know it is the slidetext div that somehow need to only show if there is text. It is the tagline I use for the text. So as far as I see it there are two ways of doing it.

1. only show slidetext if there is anything in the tagline.

2. Hide or show tagline based on the category the images are placed into.

Sadly I have failed to make any of the solutions work, so any help would be much appreciated.

To make it easier to see what I meen I will place the code I think needs to be modified here:
<?php if($slide->content): ?>
				<div class="slidetext">
					<?php if($slide->params->get('title')): ?>
					<h1><a<?php echo $slide->target; ?> href="<?php echo $slide->link; ?>"><?php echo $slide->title; ?></a></h1>
					<?php endif; ?>
	
					<?php if($slide->params->get('category') && $slide->category): ?>
					<h2><?php echo $slide->category; ?></h2>
					<?php endif; ?>
	
					<?php if($slide->params->get('tagline') && $slide->tagline): ?>
					<h3><?php echo $slide->tagline; ?></h3>
					<?php endif; ?>
					

					<?php if($slide->params->get('text') && $slide->text): ?>
					<p><?php echo $slide->text; ?></p>
					<?php endif; ?>
	
					<?php if($slide->params->get('readmore') && $slide->link): ?>
					<a<?php echo $slide->target; ?> href="<?php echo $slide->link; ?>" class="fpssReadMore" title="<?php echo JText::_('FPSS_MOD_READ_MORE_ABOUT'); ?> <?php echo $slide->altTitle; ?>"><?php echo JText::_('FPSS_MORE'); ?></a>
					<?php endif; ?>
				</div>

Please Log in or Create an account to join the conversation.

  • sorlia
  • sorlia's Avatar Topic Author
  • Offline
  • New Member
More
12 years 10 months ago #45309 by sorlia
Replied by sorlia on topic Re: Hide contentbox when empty
Is there noone that can help me with this?

I have tried and tried but cannot find a solution. Any help would be greatly appreciated.

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum