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.

Problems calling channel data

January 26, 2011 1:23am

Subscribe [3]
  • #1 / Jan 26, 2011 1:23am

    grounded

    138 posts

    OK, this is prob a simple solution, but I am a newbie and it eludes me. I will explain what I am doing:

    I need to transfer a news archive from a previous website into my new website in EE. The news archive has 3 fields, a date, (posted a separate thread for why the date is showing up as a number and not a date), and a text Area body field. I am using structure to manage most of my pages, (but obviously with a large number of entries, the structure becomes unmanagable). I have created a new channel just for the news archive entries, so the posting a new entry is as simple as Content > Publish > News Release. I have assigned a template/field group specific to that channel. This channel is not being managed by the ‘Structure’ module at all. On a side note I have noticed that I have to assign the URL to the ‘Pages URL’ as it will not show up in the standard Publish Tab URL title area….

    There are MANY entries I will need to migrate, so I need to make sure I do it right the first time. Going back over each entry would kill much time.

    SO, i am trying to call my ‘news archive’ entries in the template of another channel, (which I assume is possible..) I need to pull the news archive entries in multiple locations across the site, (in different ways for each location). In a template of the first location I need to pull the info, (summarized with 3-5 lines or so, and limited to 10-20 entries…which i can figure out once i get the data to at least pull..)

    I am using:

    {exp:channel:entries channel="pressreleasearchive"
        orderby="date"    
        limit="5"}
    {/exp:channel:entries}

    The channel i am trying to pull from is called “pressreleasearchive”, and placed inside the template location within a different channel.
    I get no output of data at all, so I’m not sure what is going on.

  • #2 / Jan 26, 2011 4:11pm

    Ingmar

    29245 posts

    You aren’t using any fields, not even {title}. Try this:

    {exp:channel:entries channel="pressreleasearchive"}
    {title}
    {/exp:channel:entries}
  • #3 / Jan 26, 2011 4:28pm

    grounded

    138 posts

    So i tried inserting 2 of the fields in my field group ‘pressreleasearchive’ in there:

    {exp:channel:entries channel="pressreleasearchive"}
    {DateOfEntry}
    {PressReleaseBody}
    
    {/exp:channel:entries}


    with no luck. May i have it setup wrong then? i AM able to get this to show channel title:

     

    {exp:channel:info channel="pressreleasearchive"}
    
    Channel Name: {channel_title}
    
    
    Description: {channel_description}
    
    {/exp:channel:info}

    :
    Channel Name: Press Release Archive
    Description:

    At no point do I actually call a field group do I? Only the individual fields that are grouped to the channel i am needing to display

  • #4 / Jan 26, 2011 4:37pm

    BigCItyShelts

    35 posts

    I’m pretty sure you’ll need the dynamic attribute off in this case:

    {exp:channel:entries channel="pressreleasearchive" dynamic="no"}
  • #5 / Jan 26, 2011 6:27pm

    grounded

    138 posts

    OK, with that attribute,  got it to display ALL the entries, now to widdle it down..

  • #6 / Jan 26, 2011 8:48pm

    grounded

    138 posts

    OK, here’s an even more obvious question: I have gotten the channel entries to display in their entirety, and the date and title to display as i prefer.
    What variable call/parameter limits each entry to like 5-10 lines, with the option to ‘read more’ or click to entry?

        If i get it figured out, I will update this entry   😊

  • #7 / Jan 27, 2011 1:46am

    grounded

    138 posts

    OK, different question. In my code below, how do i make the {title} of the entry call, a link back to that entry, (a read more/ or read article type of function) Having a couple lines of the body would be great though, but this would solve my issue for this portion I believe

    {exp:channel:entries channel="pressreleasearchive"  limit="7" display="1"    paginate="bottom"  dynamic="no"}
    
    <h2>{title}</h2>
    <p><strong>{DateOfEntry format="%F %d %Y"}   </strong><br />
    <!-- {PressReleaseBody} --></p>
    
    <p>{paginate}</p>
    
    <p>Page {current_page} of {total_pages} pages {pagination_links}</p>
    
    <p>{/paginate}</p>
    
    <p>{/exp:channel:entries}

  • #8 / Jan 27, 2011 5:07pm

    Ingmar

    29245 posts

    What variable call/parameter limits each entry to like 5-10 lines, with the option to ‘read more’ or click to entry?

    There is no built-in way to do this, you’ll have to use a plugin like TruncHTML or similar.

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

ExpressionEngine News!

#eecms, #events, #releases