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.

help with button

March 01, 2012 1:43am

Subscribe [2]
  • #1 / Mar 01, 2012 1:43am

    groundofinferno

    1 posts

    hi,
    how i can add <more> button in my news page?
    If I click on this button i see the news completely, with comments.
    how to implement it?
    News output:
    {exp:channel:entries channel="xxx" limit="10" orderby="date"} 

    {title},  {author}


        {entry_date format='%F %d, %Y %g:%i %A'}

    {news_date}

    {news_body}
    <div class=“news”>
    </div>
    {/exp:channel:entries}

    Please help!

  • #2 / Mar 02, 2012 6:40am

    John St-Amand

    865 posts

    A common set would be the have an entries loop on the index template for the news section to list the abstracts and have a separate template for display of the full item. Such as:

    news/index

    {exp:channel:entries channel="ABC" limit="25" orderby="date" sort="desc" disable="member_data|categories" dynamic="no"}
    
    your fields here, such as title, date, abstract
    
    <a href="http://{url_title_path=news/detail/}">More</a>
    
    {/exp:channel:entries}

    Then in the news/detail template:

    {exp:channel:entries channel="ABC" limit="1" orderby="date" sort="desc" disable="member_data|categories" dynamic="yes"}
    
    your fields here, such as title, date, full body, others
    
    {/exp:channel:entries}

    There are many others ways to do this, but this is a pretty common application.  Hope this help you.

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

ExpressionEngine News!

#eecms, #events, #releases