Add content field to a template page
  • Maybe this is the wrong category, but let's try:

    I've added a content field to an article type. I can see the field correctly in the editor. However, when viewing the page after publishing, my newly added field isn't visible. What can I do to resolve this problem? (I've tried several possible solutions, with no luck)

    //Rickard

    1818 x 786 - 269K
    Post edited by Rickard Wahlander at 2013-07-11 12:12:30
  • 6 Comments sorted by
  • Vote Up0Vote Down Daniel JamesDaniel James
    Posts: 844Member, Sourcefabric Team
    Hi Rickard, it sounds like the issue is with your article template. Could you please paste in the relevant template or attach it as a file to your reply?

    Cheers!

    Daniel
  • Vote Up0Vote Down Daniel JamesDaniel James
    Posts: 844Member, Sourcefabric Team
    What I'm hoping to see is a part of your article template which exactly matches the new field you have created in the article type, such as:

    {{ $gimme->article->ingress }}
    If you do have that part, we need to find out what else could be wrong.
  • {{ if $gimme->article->content_accessible }}               
                   
                    {{ if $gimme->article->type_name == "news" }}
                    <!-- if you want to use responsive images use {{ include file="_tpl/img/img_picturefill.tpl" }} -->
                    {{ include file="_tpl/img/img_600x400.tpl" }}
                   
            {{ /if }}
                    {{ count }}
                    <div class="clearfix">{{ include file="_tpl/_edit-article.tpl" }}{{ $gimme->articletype->news->ingress }}{{ $gimme->article->full_text }}</div>
                </article>
    Post edited by Rickard Wahlander at 2013-07-13 11:59:57
  • also: http://pastebin.com/qQTHe5GQ (same code but this shows full file article-cont.tpl)
    Post edited by Rickard Wahlander at 2013-07-13 12:08:10
  • Still no solution for this?
  • Replace {{ $gimme->articletype->news->ingress }} with the code provided by Daniel James.
    Post edited by Sebastian Olsson (2) at 2014-01-16 04:54:50