We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Channel Entries Don't display the same on 2 different pages

Development and Programming

Phoenix First's avatar
Phoenix First
43 posts
about 13 years ago
Phoenix First's avatar Phoenix First

I have copied the exact same code from one page to another.. however on the second page it doesn’t display correctly as it does on the first..

Here (http://www.phoenixfirst.org/page/) under the changed lives tab it displays the way i want and is limited to only 3 entries

Here (http://www.phoenixfirst.org/media-center/changed-lives) I need a longer list so our visitors can view more videos if they want.

What would be the reasoning for the exact same code to not work on 2 different pages?

Here is the code I’m using…

{exp:channel:entries channel="changed_life" limit="20" status="approved"}
    
<div  margin-bottom:4px; border-bottom:dotted 1px #666666;">
<div ><a href="http://{field_id_155}" target="new" rel="noopener">{recent_artwork}</a></div>
<div align="left"  padding-left:188px; padding-top:30px;">{title}</div>
<div align="left"  padding-left:188px;"><a href="http://{field_id_155}" target="new" rel="noopener">Watch Video >>></a></div><div ></div></div>
 
 
 {/exp:channel:entries}
       
wildrock's avatar
wildrock
262 posts
about 13 years ago
wildrock's avatar wildrock

Couple ideas.

First, make sure you don’t have the channel:entries tag on the media-center/changed-lives template nested within another set of tags. Secondly, add in a dynamic=”no” parameter to the tag to see if that helps.

Also, you say that the tags are using the “exact same code.” If one is limited to 3 entries, and the other 20, they are not identical. Maybe there is another difference in the two that you are overlooking? Even the most seasoned developers can overlook a detail once in a while if they’ve been staring at their code too long… 😉

-jim

       
Phoenix First's avatar
Phoenix First
43 posts
about 13 years ago
Phoenix First's avatar Phoenix First

I tried adding the dynamic tag.. no help.

The code is 100% identical except for the different number of entries to display.

       
wildrock's avatar
wildrock
262 posts
about 13 years ago
wildrock's avatar wildrock

Ok, given that you don’t have the second instance of your code nested, I’d start looking at some other problems with markup.

For instance, you’ve got two extra closing div tags at the end of this code block:

<div  margin-bottom:4px; border-bottom:dotted 1px #666666;">
<div ><a href="http://{field_id_155}" target="new" rel="noopener">{recent_artwork}</a></div>
<div align="left"  padding-left:188px; padding-top:30px;">{title}</div>
<div align="left"  padding-left:188px;"><a href="http://{field_id_155}" target="new" rel="noopener">Watch Video >>></a></div><div ></div></div>

This could be blowing your presentation out of the water, unless for some (unlikely) reason those tags would matchup with opening div tags before the opening {exp:channel:entries … } tag.

If cleaning up that markup doesn’t work, I’d take the whole tag and put it into a snippet, use the snippet in its place, and troubleshoot outside the tag codeblock until the culprit arises.

       
Phoenix First's avatar
Phoenix First
43 posts
about 13 years ago
Phoenix First's avatar Phoenix First

Here is the code for the entire page…

<?php
/////////////////////////////
// Page variables
////////////////////////////
$pagerLocation = '{site_url}design/';
$cycleImages = '{site_url}design/';
$sidebarType = 'None';  // Left, Right, None (case sensitive)
if($sidebarType == 'None') { $noSidebar = $sidebarType; } else { $noSidebar = ''; }
$sidebarIncludes = array('giving','new','email',); 

/////////////////////////////////////
// GET THE CURRENT TIME
/////////////////////////////////////
$today = time();
$timeOffset = -7200;
 
?>

<?
/////////////////////////////////////////////////////////////
// START CONTENT HERE
///////////////////////////////////////////////////////////////////////////////
?>
{embed=newcolorincludes/doc-start-1 page_name="Phoenix First \\\\\\\\ Media Center \\\\\\\\ Changed Lives" page_description='' page_keywords=""}

<? //////////////////////////////////
// CUSTOM STYLES AND SCRIPTS
////////////////////////////////// ?>
<style type="text/css">
 {embed=newcolorstyles/mediacenter}
 {embed=newcolorstyles/mediacenter video-header="http://www.phoenixfirst.org/design/sermons2.png" header_height="100"}

</style>

{embed=newcolorincludes/doc-start-2}

{embed=newcolorincludes/nav}

{embed=newcolorincludes/header-start}

<div class="fixed"><a href="http://www.phoenixfirst.org/page/id/tell-us-your-story%22id=%22content%22></a>" class="textHidden">click here</a>.
                            
{exp:channel:entries channel="changed_life" limit="20" status="approved" dynamic="no"}
    
<div  margin-bottom:4px; border-bottom:dotted 1px #666666;">
<div ><a href="http://{field_id_155}" target="new" rel="noopener">{recent_artwork}</a></div>
<div align="left"  padding-left:188px; padding-top:30px;">{title}</div>
<div align="left"  padding-left:188px;"><a href="http://{field_id_155}" target="new" rel="noopener">Watch Video >>></a></div><div ></div>
 
 
 {/exp:channel:entries}

</div></div>



                               
{!-- CONTENT ENDS HERE ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// --}

    </div>
                <div class="contentDivs<?=$sidebarType;?>" id="contentSidebar<?=$noSidebar;?>">
     <div class="sidebarTopPadding"></div>


{!-- ////////////////////////////////
// EMBED THE MINISTRY NAVIGATION, ETC
///////////////////////////////////// --}

<?
if($sidebarType != 'None') {
    foreach($sidebarIncludes as $include) {
        echo '{embed=newcolorsidebar/'.$include.' sidebarType="'.$sidebarType.'"}';
    }
}
?>
    </div>
                <div class="clear"></div>


{!-- SIDEBARS END HERE //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// --}
                

{embed=newcolorincludes/content-end}    

{embed=newcolorincludes/footer}
[removed][removed]
[removed]
/*<![CDATA[ */
$(function(){
 var $fblikebtn = '<fb:like href="{site_url}interact/video/<?=$currentVidUrl;?>" show_faces="false" width="340"></fb:like>';
 $("#fbml").append($fblikebtn);
});
/*]]>*/
[removed] 

[removed][removed]
[removed]
 $(".trigger").tooltip();
 
 $(function() {

 $("a[rel]").overlay({

  mask: 'black',

  onBeforeLoad: function() {

   // grab wrapper element inside content
   var wrap = this.getOverlay().find(".contentWrap");

   // load the page specified in the trigger
   wrap.load(this.getTrigger().attr("href"));
  }

 });
});
[removed]


<div id="fb-root"></div>
[removed](function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) return;
  js = d.createElement(s); js.id = id;
  js.src = "//connect.facebook.net/en_US/all.js#xfbml=1&appId=223774360984556";
  fjs[removed].insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));[removed]

{embed=newcolorincludes/doc-end}
       
wildrock's avatar
wildrock
262 posts
about 13 years ago
wildrock's avatar wildrock

You’ve still got a extra closing /div tag in your channel tag at the end (3 where you need 2).

Your third PHP code block comment isn’t closed properly. You may have some unintended results from that, too.

A couple other comments: You’re using a lot of embeds, while snippets in some cases might suffice and be more efficient; and in some of your embeds with included variables, you aren’t enclosing the “template-group/template” value with quotation marks, while you are enclosing the variable’s value. This may have some unintended consequences.

There may be more, but I’m not a php expert, so I’m not going to comment on that code outside of the comment above.

Hope this helps,

-jim

       
wildrock's avatar
wildrock
262 posts
about 13 years ago
wildrock's avatar wildrock

I took a look at your source code from the browser, and it indicates that your channel tag is outputting properly. This is the source from the page that only presents one video, while there clearly are three output, as you intended:

<div  margin-bottom:4px; border-bottom:dotted 1px #666666;">
<div ><a href="http://player.vimeo.com/external/57703502.hd.mp4?s=bbbec508e9c263f406697132f24b125e" target="new" rel="noopener">http://phoenixfirst.ehclients.com/images/uploads/recent-service/400115226_295.jpg</a></div>
<div align="left"  padding-left:188px; padding-top:30px;">Kellee</div>
<div align="left"  padding-left:188px;"><a href="http://player.vimeo.com/external/57703502.hd.mp4?s=bbbec508e9c263f406697132f24b125e" target="new" rel="noopener">Watch Video >>></a></div></div>

<div ></div>
 
    
<div  margin-bottom:4px; border-bottom:dotted 1px #666666;">
<div ><a href="http://player.vimeo.com/external/57717394.hd.mp4?s=b7c54c80c56adee21c87b870c03b74e6" target="new" rel="noopener">http://phoenixfirst.ehclients.com/images/uploads/recent-service/400222293_295.jpg</a></div>
<div align="left"  padding-left:188px; padding-top:30px;">Jeremiah</div>
<div align="left"  padding-left:188px;"><a href="http://player.vimeo.com/external/57717394.hd.mp4?s=b7c54c80c56adee21c87b870c03b74e6" target="new" rel="noopener">Watch Video >>></a></div></div>

<div ></div>
 
    
<div  margin-bottom:4px; border-bottom:dotted 1px #666666;">
<div ><a href="https://vimeo.com/53562215" target="new" rel="noopener">http://phoenixfirst.ehclients.com/images/uploads/recent-service/370015792_295.jpg</a></div>
<div align="left"  padding-left:188px; padding-top:30px;">Mark & Cindy</div>
<div align="left"  padding-left:188px;"><a href="https://vimeo.com/53562215" target="new" rel="noopener">Watch Video >>></a></div></div>

<div ></div>

What is different between this code block and the first page that presents 3 videos properly, is where your clear:both tag is placed.

Hope this helps…

-jim

       
Phoenix First's avatar
Phoenix First
43 posts
about 13 years ago
Phoenix First's avatar Phoenix First

In the Channel entry tag.. the div clear is in the same location.. there is one more below it on the homepage.. but it’s the same in the other.. I removed it all together and it still is only displaying one entry on the archive page.

that page is the same as another page that displays a list of archived videos from another channel and it works just fine.. i even copied and pasted the code from that page and just replaced the channel name and it still doesn’t display properly..

I’m quite confused.

       
Phoenix First's avatar
Phoenix First
43 posts
about 13 years ago
Phoenix First's avatar Phoenix First

Nevermind.. It is working now.. Of course a small overlook on my part on a div tag at the beginning of the content.

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.