Hi, thanks for this great theme. I've created a slideshow using views slideshow and now I wanted to replace it with the default slide show of your theme. can you please guide me how can I do that. I'll be truly grateful for your support. Thank you.

Comments

drupaal’s picture

just wanted to add in my above request that I wanted to place my slideshow in the preface top region otherwise I tried switching to the Danblog theme and use the preface first region but I really wanted to use the preface top region for slideshow because I've other plans for preface first, second and third regions. Tnx.

danpros’s picture

Hi,

You can creating new region for the slideshow and placing the slideshow in there.

First replacing

<div id="slideshow-wrapper">
<div class="slideshow-inner">
<div id="slideshow-preface">
 <?php if ($preface): ?>
          <div id="preface">
            <?php print $preface; ?>
          </div><!-- /preface -->
 <?php endif; ?>
</div>
<?php if ($mission) : ?><div id="slideshow-bottom">
<div id="mission"><?php print $mission; ?></div></div><?php endif; ?>
<div class="slideshow">
<img src="<?php print $base_path . $directory; ?>/images/slideshows/sea.jpg" width="950" height="355" alt="slideshow 1"/>
<img src="<?php print $base_path . $directory; ?>/images/slideshows/noon.jpg" width="950" height="355" alt="slideshow 2"/>
<img src="<?php print $base_path . $directory; ?>/images/slideshows/snow.jpg" width="950" height="355" alt="slideshow 3"/>
</div>
</div>
</div>

With this, the preface top not printed (just an example)

<?php if($slideshow) : ?>
			<div id="slideshow-wrapper">
				<div class="slideshow-inner">
					<?php print $slideshow; ?>
				</div>
			</div> <!-- end slideshow-wrapper -->
		<div style="clear:both"></div>
<?php endif; ?>

Adding the new region in Danland info file

regions[slideshow] = Slideshow

Or you can creating conditional statement like this, so if no block placing into "slideshow region" then it back to default slideshow

<?php if(!$slideshow) : ?>
<div id="slideshow-wrapper">
<div class="slideshow-inner">
<div id="slideshow-preface">
 <?php if ($preface): ?>
          <div id="preface">
            <?php print $preface; ?>
          </div><!-- /preface -->
 <?php endif; ?>
</div>
<?php if ($mission) : ?><div id="slideshow-bottom">
<div id="mission"><?php print $mission; ?></div></div><?php endif; ?>
<div class="slideshow">
<img src="<?php print $base_path . $directory; ?>/images/slideshows/sea.jpg" width="950" height="355" alt="slideshow 1"/>
<img src="<?php print $base_path . $directory; ?>/images/slideshows/noon.jpg" width="950" height="355" alt="slideshow 2"/>
<img src="<?php print $base_path . $directory; ?>/images/slideshows/snow.jpg" width="950" height="355" alt="slideshow 3"/>
</div>
</div>
</div>
<?php endif; ?>

<?php if($slideshow) : ?>
			<div id="slideshow-wrapper">
				<div class="slideshow-inner">
					<?php print $slideshow; ?>
				</div>
			</div> <!-- end slideshow-wrapper -->
		<div style="clear:both"></div>
<?php endif; ?>

And placing the block there. The rest is CSS.

I will adding this in my next release.

Dan

drupaal’s picture

Hi, thanks for the prompt reply. just wanted to clarify that this change will go into the page-front.tpl.php file, right? and secondly, when your new release is coming? Tnx.

drupaal’s picture

Hi, just followed your suggestions and used that option conditional statement if "slideshow" region will have something then the default slide show will not show and it worked 99% :) except, I'm using thumb numbers for the sliders and they were showing at the bottom left side but now they are gone. can you help me bring them back and how can I place them over my slideshow's image? Tnx.

joostvdl’s picture

For Drupal 7 the changed code has to be:

<?php if($page['slideshow']) : ?>
    <div id="slideshow-wrapper">
	<div class="slideshow-inner">
		<?php print render ($page['slideshow']); ?>
	</div>
    </div> <!-- end slideshow-wrapper -->
    <div style="clear:both"></div>
<?php endif; ?>
verta’s picture

Thanks for this code, I was wondering if there is a way in the conditional logic to only load the div class="slideshow" with the images into the browser only if the slideshow region is not being used? As an else on the if ($slideshow) perhaps?

lias’s picture

Thanks for the code

drupaal’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

ryan.gibson’s picture

Did this region ever get created or do we still need to apply the code manually? If so, which file needs to have the code added to for Drupal 7?