2

I am new to expression engine. I have a channel name "news" and I have published some pages. In my template, I have used code as

{exp:channel:entries channel="news"}
  <h2>{title}<h2>
  {body}
{/exp:channel:entries}

But the output is I get the page title but the content doesn't shows up and i get {body} as it is on the frontend

Can anyone help me please, where I am doing wrong.

ANy help is really appreciated.

1 Answer 1

4

You need to ensure that you have created a Channel Field Group and assigned that to your Channel (News). Then, make sure that you have created at least one field in your Channel Field Group. In this case it would be a Textarea Field Type with a name of body.

Then in your Publish/Edit screen for your Channel you'll see your new Body field. Once you enter in some text into this field and save the Entry you should see the results appear in your templates.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.