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.

A little help with entries and URL's

December 13, 2009 4:59pm

Subscribe [1]
  • #1 / Dec 13, 2009 4:59pm

    nZac

    95 posts

    Here is the code I am working with.

    {assign_variable:archive_url="archives"}
    
    {exp:weblog:entries orderby="date" sort="desc" month_limit="20" limit="10" }
    {if category_request}
        {if count == 1}
            <h1>Entries for {categories}{category_name}{/categories} </h1>
        {/if}
        <h3><a href="http://{permalink}">{title}</a></h3>
    <p>     {summary}<br />
         <div class="article-notes"><br />
            This entry was posted on {entry_date format="%M %d, %Y "} and is filed under<br />
                {categories backspace="1"}<a href="http://">{category_name}</a>, <br />
                {/categories}.  {comment_total} people have commented on it. <br />
        </div><br />
        {if no_results}<br />
            <h1>Nothing to see here!</h1><br />
            Empty page<br />
        {/if}<br />
    {if:else}<br />
        {if {segment_1} == {archive_url}}<br />
            {if count == 1}<br />
                <h1>Entries for {entry_date format="%F of %Y "} </h1><br />
            {/if}<br />
            </p><h3><a href="http://{permalink}">{title}</a></h3>
    <p>         {summary} hello<br />
             <div class="article-notes"><br />
                This entry was posted on {entry_date format="%M %d, %Y "} and is filed under<br />
                    {categories backspace="1"}<a href="http://">{category_name}</a>, <br />
                    {/categories}.  {comment_total} people have commented on it. <br />
            </div><br />
            {if no_results}<br />
                <h1>Nothing to see here!</h1><br />
                Empty page<br />
            {/if}<br />
        {if:elseif  {segment_1} != {archive_url}}</p>
    
    <p>     <h1><a href="http://{permalink}">{title}</a></h1><br />
        {body}<br />
        N<span class="highlight">Z</span><br />
        <div class="article-notes"><br />
            This entry was posted on {entry_date format="%M %d, %Y "} and is filed under<br />
                {categories backspace="1"}<a href="http://">{category_name}</a>, <br />
                {/categories}.  {comment_total} people have commented on it. <br />
        </div><br />
        {/if}<br />
    {/if}<br />
                            {/exp:weblog:entries}

    The problem:

    At this URL: http://example.com/C1/  it shows the list of entries for that category like it should.

    At this URL: http://example.com/archives/2009/12/  it shows a list of the the entries in December of 2009 like it should.

    At this URL: http://example.com/2/ it shows one entry formatted as though it were a list of entries in a particular month and not the entry itself.


    So essentially what is not working is

    {if {segment_1} == {archive_url}}

    Why wont it display the article and it’s body?

    Any thoughts.  If you need more info let me know?

  • #2 / Dec 13, 2009 9:35pm

    nZac

    95 posts

    Any ideas?

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

ExpressionEngine News!

#eecms, #events, #releases