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.

{body} tag?

September 20, 2011 3:34pm

Subscribe [2]
  • #1 / Sep 20, 2011 3:34pm

    vaneone

    2 posts

    Sorry if this has been posted before, couldn’t find it


    So I am running v2.1.3

    I am writing a template page to return entries as JSON data for use with external modules

    All of my variables are showing except for {body}

    {
        RESTService: {
    
            entries:{
                {exp:channel:entries}
                
                {count} : {    
                    
                    entry_id    :"{entry_id}",
                    author_id    :"{author_id}",
                    author        :"{author}",
                    channel_id    :"{channel_id}",
                    channel        :"{channel}",
                    permalink    :"{title_permalink='pages/show'}",
                    title        :"{title}",
                    body        :"{body}",
                    status        :"{status}",
                        
                }    
                    
    
                {/exp:channel:entries}
            }
        }
    }

    when I view the template, all of the tags return the expected data except for {body} which just shows {body}

    am I using an incorrect tag? I don’t see in the docs where is describes a tag for showing the post body,
    I am using {body} because it shows up in the examples

    I am new to EE, so sorry if newbie question

    wat do?

    -D

  • #2 / Sep 21, 2011 12:18am

    Dan Decker

    7338 posts

    vaneone,

    I’m sorry for any confusion, but {body} is used in the examples as just that, an example. You would need to substitute the short name for the custom field you want in it’s place. Do you have custom fields assigned to this channel?

    Cheers,

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

ExpressionEngine News!

#eecms, #events, #releases