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.

Add channel fields to a existing channel, code reflecting the new field in template, but not in CP

December 19, 2012 11:39am

Subscribe [3]
  • #1 / Dec 19, 2012 11:39am

    tdidart

    4 posts

    Basically I have an existing template and a channel group, I added a new channel field to it. Then went to the template, added in code to ‘pull’ it in.  When I went to the CP to the existing page and edit entry, it did not reflect the added channel field.

    Any suggestions?

  • #2 / Dec 19, 2012 12:16pm

    Gareth Davies

    491 posts

    Firstly, is the channel you are posting to associated with the correct channel field group? Go to Admin->Channel Administration->Channels and Edit Group Assignments on the channel in question and make sure your channel field group is correctly set.

  • #3 / Dec 19, 2012 1:36pm

    tdidart

    4 posts

    This is what I am having trouble processing.

    There is a channel field group from another channel, I want to use that channel field group in a different channel Or do I have to make a new channel field group, put in the fields, and have them assigned to its own channel group?  In the attachment, I have in the channel Field group as FAQ fields, These are from another channel. I want to use the same fields in the SubWeb FAQ Page channel.  Is that possible?

    The original problem is similar in that I am using channel fields from different channels to create the template. All that is ok until I add another channel field either from the same channel or another, and it does populate when i view in browser, but not in the CP itself for publishing. Is that contingent on the channel settings and the channel fields assigned?

  • #4 / Dec 19, 2012 1:49pm

    Gareth Davies

    491 posts

    Yes, you can use one channel field group for as many channels as you wish. If you add another field to the FAQ Fields group it will then show on all channels that are using this field group.

  • #5 / Dec 19, 2012 3:37pm

    tdidart

    4 posts

    Then I can also use different channel fields in different templates. They don’t have to be from just one channel group.

    Then how come when I add a channel field to an existing template it does not populate when I want to edit the page? the coding below is what is giving me the problem.

    {cf_feature_image}
      <div class=“feature”  380px; overflow: hidden; width: 880px;”>
      _   _   {exp:imgsizer:size src="{cf_feature_image}” width=“880” height=“380”}_     {sized}_   {/exp:imgsizer:size}_   _  
      </div>
           
        {/cf_feature_image}

    Yet the page on the browser is showing a space on the page for the feature image, but the CP edit entry doesn’t- see image.

    Thanks for your help.

  • #6 / Dec 19, 2012 7:10pm

    Gareth Davies

    491 posts

    You first need to add the channel field to the field group. So in your instance you would add a custom field to the FAQ channel field group.

    Only once you have done that can you add the template tags and assuming that they are within a {exp:channel:entries} loop they then will be displayed.

    Adding tags to the template will display nothing if there is no corresponding field setup.

  • #7 / Dec 20, 2012 8:58am

    tdidart

    4 posts

    I thought I could use channel field from other channel field groups in a different channel field group.  Do I have to recreate it in the different channel field group? Or can the channel field be assigned to multiple channel field groups and channels?

  • #8 / Dec 20, 2012 11:35am

    Boyink!

    5011 posts

    A field belongs to one and only one field group.

    One field group can be assigned to multiple channels.

    One channel can only have one field group assigned to it.

  • #9 / Dec 20, 2012 12:01pm

    tdidart

    4 posts

    Thank you both for your help.  I finally got it thanks to the feedback.

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

ExpressionEngine News!

#eecms, #events, #releases