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.

I think the "dynamic=off" function is messing stuff up

June 06, 2008 6:26pm

Subscribe [3]
  • #1 / Jun 06, 2008 6:26pm

    cuomo24

    18 posts

    Hey guys, at my website, tenthavenuenorth.com , on the right hand column, there is the ability to choose which journal / blog entry you want to view. In order to keep all entries available, I had to paginate the entries, but I also had to turn off the dynamic function in order to get the links to update the left hand column (where the blog appears). Now that there are enough entries to test the paginate function, it seems it’s not working. Is this because of the dynamic function? If so, how can I fix it so all sections work?

    Thanks,
    Scott

  • #2 / Jun 06, 2008 6:35pm

    Ingmar

    29245 posts

    Yes, pagination requires the use of the dynamic parameter. I would suggest to simply put the content of your sidebar in a subtemplate, and {embed} that. Makes sense?

  • #3 / Jun 06, 2008 7:09pm

    cuomo24

    18 posts

    ummmm, I guess I don’t understand, because I just tried what I thought you suggested and it didn’t work.

    I made a template for the main section (the left hand column that the blog entry appears in) and I made a template for the sidebar. I turned the dynamic to “off” for the main, left hand side, and turned it on for the right side. I then embedded the two, and now the links won’t update the left hand side.

    Here’s some code -

    Left hand template -

    <div id="entryWrapper">
            <div id="entryContent">{site_url}images/word-journal.png
    
    
    
              <div class="journalBox">{exp:weblog:entries weblog="mikes_journal" limit="1" show_future_entries="yes" show_expired="no" orderby="journal_date" sort="desc" dynamic="off"}
              <div class="date">{journal_date format="%m/%d/%y"}</div>
              <div class="title"><u>{title}</u></div>
    
              <div class="content">{journal_body}</div>{/exp:weblog:entries}
            </div>
            </div>

    And the right hand / sidebar code -

    <div id="journalSidewrap">{exp:weblog:entries weblog="mikes_journal" limit="8" show_future_entries="yes" show_expired="no" orderby="journal_date" sort="desc" dynamic="on" paginate="top"}
            <div class="journalSide1"> 
            {paginate}
            {if {total_pages} > 1}
            Page {current_page} of {total_pages} pages {pagination_links}
            {/if}
            {/paginate} 
            <div class="date">{journal_date format="%m/%d/%y"}</div>
            <div class="title"><a href="http://{url_title}"><u>{title}</u></a></div>
            </div>{/exp:weblog:entries}
            </div>
            </div>

    Thanks,
    Scott

  • #4 / Jun 06, 2008 7:18pm

    Jesse M

    92 posts

    I’m not sure you’re going to be able to make that work at all, but if you are you’re probably going to need to use the ‘url_title’ parameter on the weblog:entries tag on the left hand side.  With dyamic=“off” it’s not going to extract it from the URL so you need to feed it the value you want, perhaps using a segment variable, e.g.

    {exp:weblog:entries url_title="{segment_3}"}
  • #5 / Jun 06, 2008 7:28pm

    cuomo24

    18 posts

    I don’t understand how to do what you’re suggesting, and honestly, it seems like EE should have a more intuitive way to handle this, since it is based around “weblogs”. I had to change the code back to the way it was and just take off the pagination, until I can either figure out what your talking about or get a different solution.

    Any help would be appericiated,

    Scott

  • #6 / Jun 07, 2008 2:26am

    Ingmar

    29245 posts

    I made a template for the main section (the left hand column that the blog entry appears in) and I made a template for the sidebar. I turned the dynamic to “off” for the main, left hand side, and turned it on for the right side.

    I would have thought it needed to be exactly the other way round: “off” for semi-static, sidebar content, that you don’t want to be influenced by what you have in the url.

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

ExpressionEngine News!

#eecms, #events, #releases