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.

My template can't access a Channel entry

August 27, 2011 4:46pm

Subscribe [5]
  • #1 / Aug 27, 2011 4:46pm

    nikkimarie

    2 posts

    Hi guys, probably a newbie issue here, but I’m building a portfolio site and I am looking to keep some content at the top of the site that is always there on every page. The content seems to show up on all my “top-level” pages, like home and about, but when I go to a project/detail page it seems that it can no longer find that channel entry. Do I need to reference it differently in the detail pages? Thanks so much if anyone can help me!

  • #2 / Aug 27, 2011 4:54pm

    @nnette

    109 posts

    It would help if you can post some of the code on your pages ...

  • #3 / Aug 27, 2011 4:56pm

    nikkimarie

    2 posts

    <div id="quote">
            {exp:channel:entries limit="1" channel="simple_content" url_title="quote"}
                {content}
            {/exp:channel:entries}        
    </div>

    That is the code that works on the “top-level” but not in project/detail.

  • #4 / Aug 28, 2011 4:24am

    @nnette

    109 posts

    <div id="quote">
            {exp:channel:entries limit="1" channel="simple_content" url_title="quote"}
                {content}
            {/exp:channel:entries}        
    </div>

    That is the code that works on the “top-level” but not in project/detail.

     

    Have you tried looking at the path settings?

  • #5 / Aug 28, 2011 5:37am

    Lee Powell

    88 posts

    Are you using a custom status to sticky your post?

    If so, try this:

    <div id="quote">
            {exp:channel:entries limit="1" channel="simple_content" url_title="quote" status="not closed"}
                {content}
            {/exp:channel:entries}        
    </div>

    More reading:
    http://ellislab.com/expressionengine/user-guide/modules/channel/parameters.html#par_status

  • #6 / Aug 28, 2011 8:35am

    Mark Bowen

    12637 posts

    What you’re probably looking for here will be the dynamic=“no” Channel parameter so that you can use that tag without the URL influencing what is shown.

    Hope that helps a bit.

    Best wishes,

    Mark

  • #7 / Aug 28, 2011 3:38pm

    nikkimarie

    2 posts

    Hey guys, I was able to make it show up by changing the post to sticky and adding the dynamic=“no” channel parameter Mark suggested. Thanks so much for your help!

  • #8 / Aug 28, 2011 6:05pm

    Mark Bowen

    12637 posts

    Just as a quick note, adding in the sticky isn’t necessarily required here. If as you are doing is supplying the url_title to the Channel tag then the dynamic=“no” parameter should really be the only other item required here as that will then ensure that the tag only returns what you ask it to.

    Best wishes,

    Mark

  • #9 / Aug 29, 2011 2:33am

    John Henry Donovan

    12339 posts

    Thanks Mark. Feel free nikkiemarie 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