ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Template/channel not appearing

November 07, 2011 8:48am

Subscribe [4]
  • #1 / Nov 07, 2011 8:48am

    ZEDG

    32 posts

    Hi,
    I dont know if anyone can help with this.. it is really strange.
    (and im certain it was working at one point.)

    On all main site templates i have embedded another template

    {embed="includes/ads"}

    The code for the ‘ads’ template is:

    {exp:channel:entries channel="ad3"}
    <div id="ad3"><h3>{title}</h3><p><a href="http://" title="{title}">{ad3_byline}</a></div> <br />
    {/exp:channel:entries}<br />
    {exp:channel:entries channel="ad2"}<br />
    <div id="ad2"></p><h3>{title}</h3><p><a href="http://" title="{title}">{ad2_byline}</a></div><br />
    {/exp:channel:entries}<br />
    {exp:channel:entries channel="ad1"}<br />
    <div id="ad1"></p><h3>{title}</h3><p><a href="http://" title="{title}">{ad1_byline}</a></div> <br />
    {/exp:channel:entries}

    Now the strange thing is that this appears as it should on one page - the home page.
    However on all (but one) other pages it does not appear at all!? On one page, only the 2nd channel (ad2) appears.

    What could possibly be the problem?

  • #2 / Nov 07, 2011 9:27am

    Mark Bowen

    12637 posts

    Hi zeg,

    If you add in the dynamic=“no” parameter to your Channel Entry Tags then this should get you what you need here.

    Best wishes,

    Mark

  • #3 / Nov 07, 2011 9:44am

    ZEDG

    32 posts

    Thanks for your response.. unfortunately that did not fix it ??

  • #4 / Nov 07, 2011 8:36pm

    Sean C. Smith

    3818 posts

    HI zedg,

    dynamic=“no” should work as Mark suggested (Thanks for the assist Mark). Did you add dynamic=“no” to all three of your exp:channel:entries tags? Could you also check that that there are entries in each of those three add channels?

    One final thing to check, if you view the includes/ads template by itself, outside of your regular templates, what do you see?

    Sean

  • #5 / Nov 07, 2011 9:29pm

    ZEDG

    32 posts

    Thanks for your help.
    Yes i added dynamic to each:

    {exp:channel:entries channel="ad3" dynamic=“no”}
    <div id="ad3"><h3>{title}</h3><p><a href="http://" title="{title}">{ad3_byline}</a></div> <br />
    {/exp:channel:entries}<br />
    {exp:channel:entries channel="ad2" dynamic=“no”}<br />
    <div id="ad2"></p><h3>{title}</h3><p><a href="http://" title="{title}">{ad2_byline}</a></div><br />
    {/exp:channel:entries}<br />
    {exp:channel:entries channel="ad1" dynamic=“no”}<br />
    <div id="ad1"></p><h3>{title}</h3><p><a href="http://" title="{title}">{ad1_byline}</a></div> <br />
    {/exp:channel:entries}

    If you view the template on its own the content appears as it should. You can see here:
    mdsi.org.au/ignore_includes/ads


    If you look at the home page here: mdsi.org.au/index
    you can see the three small ‘ad’ boxes appear correctly.

    Now if you go to this page mdsi.org.au/how-you-can-help/volunteers
    you can see that only ad2 appears at the right side (very strange!).

    And if you go to this page: mdsi.org.au/how-you-can-help/making-a-donation
    (which usese the same template as above)
    OR any other page on the site, none of the ads appear at the side.

    (ps. if you look here mdsi.org.au/volunteers.shtml this is the non-ee page of the site showing how the ads should appear).

     

  • #6 / Nov 08, 2011 5:58am

    Mark Bowen

    12637 posts

    Is that code above directly copied from your template?

    If so then you have curly quotes around the dynamic=“no” in each Channel Entry Tag. Try taking out the whole of that parameter and typing them in again by hand.

    Might be that you copied the text from the page here on the forums and it went in funny.

    Hope that helps a bit.

    Best wishes,

    Mark

  • #7 / Nov 08, 2011 8:24am

    ZEDG

    32 posts

    YES that worked!.. thankyou so much.
    Such a small thing I didn’t even notice (especially after staring at the screen for so many hours).
    Apologies for not noticing this myself.

    N.

  • #8 / Nov 08, 2011 8:27am

    Mark Bowen

    12637 posts

    No problem at all.

    Glad that helped.

    Best wishes,

    Mark

  • #9 / Nov 08, 2011 8:27am

    Sue Crocker

    26054 posts

    Glad Mark was able to assist. Feel free to start a new thread if you have any more questions.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases