We need 4 images on the home page instead of 3. Easy to make an image, but not sure how to add it in. We'd like for images to come from recent content, or from a taxonomy created for that purpose. Like the look you have going there and would like to stick with it.

CommentFileSizeAuthor
#4 TGEus-responsive-files.zip3.89 KBTGEink
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

TGEink created an issue. See original summary.

saurabh.dhariwal’s picture

Premium Responsive themes uses flexslider (Fully Customizable) for front page slider.

Further, if you want to change slide which is coming form content, that's difficult enough to manage. So an alternative way is to use Views Slideshowmodule or other slider module for that you can make changes in page.tpl.php file and css changes.

For adding 4th slide into flexslider, please follow below steps:

1. Go to theme-settings.php and find below code.

  $form['resp_settings']['slideshow']['slide3']['slide3_url'] = array(
    '#type' => 'textfield',
    '#title' => t('Slide URL'),
    '#default_value' => theme_get_setting('slide3_url','responsive'),
  );

Enter the below code after the above code.

$form['resp_settings']['slideshow']['slide4'] = array(
    '#type' => 'fieldset',
    '#title' => t('Slide 4'),
    '#collapsible' => TRUE,
    '#collapsed' => TRUE,
  );
  $form['resp_settings']['slideshow']['slide4']['slide4_desc'] = array(
    '#type' => 'textfield',
    '#title' => t('Slide Description'),
    '#default_value' => theme_get_setting('slide4_desc','responsive'),
  );
  $form['resp_settings']['slideshow']['slide4']['slide4_url'] = array(
    '#type' => 'textfield',
    '#title' => t('Slide URL'),
    '#default_value' => theme_get_setting('slide4_url','responsive'),
  );

This would set 4th slide setting in theme settings.

2. Go to your page.tpl.php file (i.e.sites\all\themes\responsive\templates\page.tpl.php) find the below code.

<li>
          <a href="<?php print url($url3); ?>"><img src="<?php print base_path() . drupal_get_path('theme', 'responsive') . '/images/slide-image-3.jpg'; ?>"/></a>
          <?php if ($cap3): ?> <div class="flex-caption"> <h3> <?php print $cap3; ?> </h3> </div> <?php endif; ?>
        </li>

Enter the below code after the above code.

<li>
          <a href="<?php print url($url4); ?>"><img src="<?php print base_path() . drupal_get_path('theme', 'responsive') . '/images/slide-image-4.jpg'; ?>"/></a>
          <?php if ($cap4): ?> <div class="flex-caption"> <h3> <?php print $cap4; ?> </h3> </div> <?php endif; ?>
        </li>

3. Go to user images folder(sites\all\themes\responsive\images) add image to be added for 4th slider. Set image file name to "slide-image-4.jpg". [This is mandatory]

Let me know if you face any query/concern regarding the same.

TGEink’s picture

Thank you so much. Tana

TGEink’s picture

FileSize
3.89 KB

We don't get the grey bar with the title. Slide comes up fine. Attaching the two files with our changes.

http://www.thegreeneconomy.us

Other than that, we really love your theme. Love your company. Will contribute. Tana

saurabh.dhariwal’s picture

Hey Tana, we do not own this theme, we are just contributing our time in providing you assistance with your challenge for this theme.

Regarding your query related to title, you need to manage it via CSS.

In page.tpl.php find below code:
$url3 = check_plain(theme_get_setting('slide3_url','responsive')); $cap3 = check_markup(theme_get_setting('slide3_desc','responsive'), 'full_html');

After add this code:
$url4 = check_plain(theme_get_setting('slide3_url','responsive')); $cap4 = check_markup(theme_get_setting('slide4_desc','responsive'), 'full_html');

Hope this address your concern.

Thanks

saurabh.dhariwal’s picture

Assigned: Unassigned » saurabh.dhariwal