I would like to edit the page.tpl.php file so that a clone of the front page slideshow is displayed on a different page. The only catch is that this slideshow would have different images. I would greatly appreciate any help you could provide me.
Thanks!

Comments

gtsopour’s picture

Title: Displaying Slideshow on a Different Page » Displaying Corporate Clean Slideshow on multiple pages (also with different slides)
Component: Code » Documentation
Assigned: Unassigned » gtsopour
Issue tags: +corporate, +Corporate Clean Theme, +CorporateClean, +Corporate Clean Slideshow
gtsopour’s picture

Hello Francisco,
we have implemented at CorporateClean 7.x-1.5 release two theme-settings for slideshow code:

  • One for including (or not) the slideshow markup code on front-page: slideshow_display
  • and a new one for including (or not) the slideshow javascript code inside template.php: slideshow_js

These two theme-settings cover the following cases:

  1. The default slideshow implementation
  2. The deactivation of the front-page slideshow with keeping the slideshow javascript code for new internal slideshows
  3. The total deactivation of the front-page slideshow and removal of the javascript code

You can read in detail the above at this issue http://drupal.org/node/1485418

Regarding your question, you should follow "The deactivation of the front-page slideshow with keeping the slideshow javascript code for new internal slideshows". Therefore, you should disable the theme-setting "Show slideshow" and keep enabled the theme-setting "Include slideshow javascript code" through Home » Administration » Appearance » CorporateClean » Settings » Front Page Slideshow.

If you have installed the CorporateClean 7.x-1.4 release, you should only disable the theme-setting "Show slideshow".

After this, you will not be able to see the Slideshow on front-page. At this time, you should create as many Drupal system blocks as slideshow blocks you want with the following HTML markup.

<!--slideshow-->
<div id="slideshow">

    <!--slider-item-->
    <div class="slider-item">
        <div class="content">
            
            <!--slider-item content-->
            <div style="float:left; padding:0 30px 0 0;">
            <img height="250px" class="masked" src="<?php print base_path() . drupal_get_path('theme', 'corporateclean') ;?>/mockup/slide-1.jpg"/>
            </div>
            <h2>Sample product name</h2>
            <strong>General</strong><br/>
            <em>Client name</em><br/>
            <br/>
            Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
            <div style="display:block; padding:30px 0 10px 0;"><a class="more" href="#">Tell me more</a></div>
            <!--EOF:slider-item content-->
            
        </div>
    </div>
    <!--EOF:slider-item-->
    
    <!--slider-item-->
    <div class="slider-item">
        <div class="content">
        
            <!--slider-item content-->
            <div style="float:right; padding:0 0 0 30px;">
            <img height="250px" class="masked" src="<?php print base_path() . drupal_get_path('theme', 'corporateclean') ;?>/mockup/slide-2.jpg"/>
            </div>
            <h2>Sample service name</h2>
            <strong>General</strong><br/>
            <em>Client name</em><br/>
            <br/>
            Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
            <div style="display:block; padding:30px 0 10px 0;"><a class="more" href="#">Tell me more</a></div>
            <!--EOF:slider-item content-->
        
        </div>
    </div>
    <!--EOF:slider-item-->
    
    <!--slider-item-->
    <div class="slider-item">
        <div class="content">
        
            <!--slider-item content-->
            <h2>Sample product name</h2>
            <strong>General</strong><br/>
            <em>Client name</em><br/>
            <br/>
            Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. 
            <div style="display:block; padding:30px 0 10px 0;"><a class="more" href="#">Tell me more</a></div>
            <!--EOF:slider-item content-->
        
        </div>
    </div>
    <!--EOF:slider-item-->
    
    <!--slider-item-->
    <div class="slider-item">
        <div class="content">
            
            <!--slider-item content-->
            <img height="250px" class="masked" src="<?php print base_path() . drupal_get_path('theme', 'corporateclean') ;?>/mockup/slide-3.jpg"/>
            <!--EOF:slider-item content-->
        
        </div>
    </div>
    <!--EOF:slider-item-->

</div>
<!--EOF:slideshow-->

<!--slider-controls-wrapper-->
<div id="slider-controls-wrapper">
    <div id="slider-controls">
        <ul id="slider-navigation">
            <li><a href="#"></a></li>
            <li><a href="#"></a></li>
            <li><a href="#"></a></li>
            <li><a href="#"></a></li>
        </ul>
    </div>
</div>
<!--EOF:slider-controls-wrapper-->

This HTML markup is exactly the same with the one included inside page.tpl.php. Just create as Drupal system blocks you want through Home » Administration » Structure » Blocks and simply paste the above code with PHP format (or Full HTML format if you configure the image paths). After creating the multiple Slideshow blocks, place all of them to the "Banner" region and finally configure each Block visibility settings.

I hope this will help you.

Thanks
George

fdgvieira’s picture

Wow, I would have never even thought to implement the code from the page.tpl as a block! Thank you so much! I will implement this and get back with confirmation of the results.Thanks so much!

fdgvieira’s picture

The text displays perfectly and the JavaScript transitions seem to be working fine, but the images aren't showing up at all. Any ideas?
Thanks again!

fdgvieira’s picture

Oh sorry! I see what I did wrong! I failed to configure the image paths!

fdgvieira’s picture

Status: Active » Closed (works as designed)
gtsopour’s picture

Status: Closed (works as designed) » Fixed

Hello Francisco,
I'm really glad that my answer helped!

Thanks
George

Status: Fixed » Closed (fixed)

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

jcc.monteiro’s picture

Hi,

I'm trying to use your block suggestion so I can translate the slideshow content for my multilingual site.
The block idea is excellent, but I can't make it work eventhough I followed all the steps you describe. Nothing really appears on banner region although I have configured it all (PHP text format, banner for region, deactivated the slideshow and kept the slideshow script activated on the theme...)
I can't find what did I do wrong...
Any clues or suggestions that may help me?

Many thanks!

jcc.monteiro’s picture

Priority: Normal » Critical
Status: Closed (fixed) » Active
learnchinesewithling’s picture

Version: 7.x-1.4 » 7.x-2.1

I tired the block suggestions and followed every steps, but nothing shows up on the banner area, it's same with Jcc.moteiro.

any suggestions that may fix it.

Thanks a lot.

learnchinesewithling’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

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

stefan1959’s picture

for the image issue, I went to module config, turned on PHP filter.
Theres a link to permission in the config. Under the Filter section, enable Use the PHP code text format for the admin.
Go to the block and change from Full HTML to PHP code.

Steve

rcraig114’s picture

OK, I'm having a bit of an issue. Using the Full HTML view for the module made the results look weird. It wasn't centered, didn't show images, and showed the block title. I tried the above method with the PHP filter. However, I can't get the block to show now period. Doesn't matter if I'm logged in as an admin or using anonymous user, the block simply won't show. I think I enabled the right permissions for PHP Filter, but can't find the culprit. Anyone have any ideas?

rcraig114’s picture

Issue summary: View changes

OK, I'm having a bit of an issue. Using the Full HTML view for the module made the results look weird. It wasn't centered, didn't show images, and showed the block title. I tried the above method with the PHP filter. However, I can't get the block to show now period. Doesn't matter if I'm logged in as an admin or using anonymous user, the block simply won't show. I think I enabled the right permissions for PHP Filter, but can't find the culprit. Anyone have any ideas?

abreese’s picture

Hi,m
This is an old post but I figure it may be valuable to add this either way. The code should be modified slightly if you want the appearance to be the same as the stock banner.

Change the lines that read: <div class="content">
to: <div class="content container_12">

hermeos’s picture

Muchísima gracias, he seguido los pasos que indicaste y todo me salió perfecto.

jvannuys’s picture

abreese, thanks! that was the missing piece and I was even comparing the source to the new code and missed it until your post!