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.

embeds not displaying on permalink redirects

March 22, 2011 7:09pm

Subscribe [3]
  • #1 / Mar 22, 2011 7:09pm

    a la mode

    168 posts

    On a simple blog with a rail displaying the latest 3 entries, the initial load and home page render fine. Once you click on the permalink to hit the view template though, the embeds do not pull any data or only pull one entry.


    This is the index code :

    <div>
        {exp:weblog:entries weblog="blog_post" orderby="date" sort="desc" limit="2" paginate="bottom"}
            <div class="article">
                <h1>{title}</h1>
                <h2 class="date_name">{entry_date format="%F %d,  %Y"}  |  {author}  </h2>
                <div class="copy">
                    {if wb_image}
                        {wb_image}
                            {wb_image_file}
                        {/wb_image}
                    {/if}
                    
                        {wb_body}
                    
                </div>
                <div class="clear"></div>
                <div class="links">
                    <div class="more">
                        <a href="http://{title_permalink=">Read full article »</a>
                    </div>
                </div>
            </div>
            <div class="clear"></div>
        {/exp:weblog:entries}
    </div>
    <div id="rail_right" class="grid_3">
        <div id="rail_content" class="png">
            {embed="Includes/rail_recents"}
        </div>
        <div class="clear"></div>
    </div>

    This is the view code :

    <div id="body_left" class="grid_9">
        {exp:weblog:entries weblog="blog_post" limit="1"}
            <div class="article">
                <h1>{title}</h1>
                <h2 class="date_name">{entry_date format="%F %d,  %Y"}  |  {author}</h2>
                <div class="copy">
                    {if wb_image}
                        {wb_image}
                            {wb_image_file}
                        {/wb_image}
                    {/if}
                    
                        {wb_body}
                    
                </div>
                <div class="clear"></div>
            </div>
            <div class="clear"></div>
        {/exp:weblog:entries}
    </div>
    <div id="rail_right" class="grid_3">
        <div id="rail_content" class="png">
            {embed="Includes/rail_recents"}
        </div>
        <div class="clear"></div>
    </div>

    Essentially the same thing. It works in the index, but not in the view…

  • #2 / Mar 23, 2011 12:16pm

    Sue Crocker

    26054 posts

    Hi, Brian.

    You need to add dynamic=“off” added to your embed exp:weblog:entries tag.

    Does that help?

  • #3 / Mar 23, 2011 12:48pm

    a la mode

    168 posts

    Sue,

    Thanks for the reply. That did the trick though. Here is what I added.

    Thank you so much!

    <div id="rail_recent">
        <h1>Recent Posts</h1>
        <ul>
            {exp:weblog:entries weblog="blog_post" orderby="date" sort="desc" limit="3" dynamic="off"}
                <li>
                    <h2 class="date_name">{entry_date format="%F %d,  %Y"}</h2>
                    <a href="http://{title_permalink=">{title}</a>
                </li>
            {/exp:weblog:entries}
        </ul>
    </div>
  • #4 / Mar 24, 2011 5:18am

    John Henry Donovan

    12339 posts

    Glad Sue was able to help. Note as I see you intend to use EE2.x shortly that dynamic=“off” becomes dynamic=“no” in that version. For future reference. 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