Situation:

I have a video game news site that uses DDB on it's home page. I would like to make a second DDB that looks / works exactly the same. The only difference I want is that the view filter only pulls in content tagged with a certain site tag.

Example:

DDB1 Shows nodes: 1 2 3 4 5 6 7 8 9 10

I want DDB2 to show nodes: 3 5 8 10 (assuming these nodes were tagged with the taxonomy term I want to filter by)

What I've done so far:

Created a new DDB instance (we'll call this "Featured News 2") and I configured it to look and act identical to my existing DDB which pulls in the top 5 most recent news (we'll call this "Featured News 1")

Cloned the existing (working) view that "Featured News 1" pulls from and added in the additional taxonomy filter I need. When I preview the view I can see the data I'm intending to display. Looks great. There are several pieces of content ready to be displayed.

I placed the new block into a specific page, and it displays but it's empty and I get the following warning.

warning: Invalid argument supplied for foreach() in /sites/all/themes/theme_name/custom/modules/ddblock/ddblock-cycle-block-content-upright40.tpl.php on line 47.

I went and checked out this line of code and it reads:

      <?php foreach ($slider_items as $slider_item): ?>
       <div class="slide clear-block border">
        <div class="slide-inner clear-block border">
         <?php print $slider_item['slide_image']; ?>
         <div class="slide-text slide-text-<?php print $slide_direction ?> slide-text-<?php print $slide_text_position ?> clear-block border">
          <div class="slide-text-inner clear-block border">
           <div class="slide-title slide-title-<?php print $slide_direction ?> clear-block border">
            <div class="slide-title-inner clear-block border">
             <h2><?php print $slider_item['slide_title'] ?></h2>
            </div> <!-- slide-title-inner-->
           </div>  <!-- slide-title-->
           <div class="slide-body-<?php print $slide_direction ?> clear-block border">
            <div class="slide-body-inner clear-block border">
             <p><?php print $slider_item['slide_text'] ?></p>
            </div> <!-- slide-body-inner-->
           </div>  <!-- slide-body-->
           <div class="slide-read-more slide-read-more-<?php print $slide_direction ?> clear-block border">
			      <p><?php print $slider_item['slide_read_more'] ?></p>
           </div><!-- slide-read-more-->
          </div> <!-- slide-text-inner-->
         </div>  <!-- slide-text-->
        </div> <!-- slide-inner-->
       </div>  <!-- slide-->
      <?php endforeach; ?>

I'm pretty novice when it comes to PHP still, but I don't think this needs to be edited, but rather I've over looked something when trying to set this up.

Comments

ppblaauw’s picture

Title: Invalid argument supplied for foreach() in ddblock-cycle-block-content-upright40.tpl.php on line 47. » Using multiple advanced dynamic display block slideshows
Status: Active » Closed (duplicate)
Issue tags: +Advanced slideshow, +preprocess functions

Have a look at issue: Using multiple views with ddblock module

Hope this helps you further, please let me know.

If this issue doesn't help, feel free to set status to active again and ask more questions.

Just a Tip: Sometimes it's difficult to find similar issues, but searching the issue queue (on all issues including the closed ones) or looking in the faq on ddblock.myalbums.biz can in a lot of cases directly give you the answer you are looking for and you don't have to wait for a reply on your issue.

Changed issue text, to be more useful for other users to search on.
Add tags