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.

How to pass entry id of the channel entry and based on open the entire channel entry?

September 14, 2011 1:02pm

Subscribe [2]
  • #1 / Sep 14, 2011 1:02pm

    Rahul

    1 posts

    Hi,
    I want to pass entry_id in url and based on that url how can i access the entire channel entries ,
    i want to do the code for example there is a list of news and on clicking on particular news link it will redirect to the details of that news or using that link how can i access my channel entry dynamically ?


    Please help me ,
    Thanks in advance

  • #2 / Sep 15, 2011 2:27am

    Rahul

    1 posts

    I have solved this by following

    <a href="http://{title_permalink=news/news_detail/}">Read More</a>
    this is the link on which when i click it opens the detail page of the news and redirects to the news_details page with the newsid
    
        {exp:channel:entries url_title="{segment_3}"}
                 your code…
            {/exp:channel:entries}

    segment_3 contains my newsid so according to the newsid i can access the detail of the news.

  • #3 / Sep 15, 2011 6:13am

    James Smith

    259 posts

    You do not need to explicitly specify the url_title in your channel:entries tag - the default behaviour of the tag is to dynamically read the url_title from the third (or second) url segment and limit the channel:entries tag to that entry.

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

ExpressionEngine News!

#eecms, #events, #releases