Hi Devsaran

I'm sorry I'm not much of a coder. I'd like to display the slideshow on only my taxonomy pages and not the front page. I had a look at the template.php code and I realised that <?php if ($is_front): ?> is controlling the slideshow placement.

Can you maybe assist in how I would change that so that it only shows on my taxonomy "Section" pages?

Thanks for a great theme.

Rick

Comments

sergiu.popa’s picture

Use menu_get_object() function:

$term = menu_get_object('taxonomy_term', 2);
if ($term) {
  // User is on a taxonomy term page
}
sergiu.popa’s picture

Issue summary: View changes
Status: Active » Closed (fixed)
Anonymous’s picture

I wondered how to display a slideshow ONLY on the front page. I'm not either a coder but I got it work when made changes on nexus/templates/page.tpl.php

Line 97 (join if sentences)
  <?php if (($is_front) && (theme_get_setting('slideshow_display','nexus'))): ?>

remove line 96 (because it's now on line 97)
remove line 137   <?php endif; ?> 
nesta_’s picture

Title: Slideshow on Taxonomy » Slide show on any page
Assigned: Unassigned » nesta_
Category: Support request » Feature request
Status: Closed (fixed) » Active

I reopen this task by the stated above.

To do this you need to create or modify the interface of the form found in Theme settings where we select the title, text and link you want. We will implement a form that has a field for the title, a field for text, one for the link "read more" and another which is the route that we want to show our slide.

We will have to perform various functions.

1 -. URL field where you insert the Slide
. 2 - "Add New Item" button Slide (where we must take into consideration the URL should be the same as the above).
. 3 - In case you want another Slide on another URL, we will have a button "Add Slide" where we will again step 2.

xurizaemon’s picture

Also consider displaying a slideshow in a block, which will give you UI to configure the pages it appears on.

PaulaThoelen’s picture

Hi Devsaran

I want to display the slideshow on all pages and views of my website. How can I do that? I only know a little of php. So I'm afraid to destroy the code. I already removed if ($is_front): on line 97 of the page.tpl.php en endif; in line 137, but that doesn't change anything on my pages. Is there something else I have to do next? Or is there another way to accomplish what I want?

I like the Nexus theme very much and I hope I don't have to use another one because of this issue.

Thanks a lot for your answer.

Pascal.s’s picture

Hey Paul,

After you delete those lines, you need to load the scripts on all pages:

At the end of the template.php, the scripts are called:

if (drupal_is_front_page()) {
drupal_add_js(drupal_get_path('theme', 'nexus') . '/js/jquery.flexslider.js');
drupal_add_js(drupal_get_path('theme', 'nexus') . '/js/slide.js');
}

Just delete: if (drupal_is_front_page())
So the scripts will be on all pages