@mgmart (Mgmart) posted a new topic, subject ".Render does not find my template". It read:

   I'm building an archive view and my approach is to use a section.
    
    I named the section ‘blogarchive' for the time being - I'm not sure wether ‘archive' is somehow a reserved word.
    
    `├── content │ ├── about.md │ ├── blogarchive │ │ └── _index.org │ └── post ├── layouts │ ├── _default │ │ └── mysummary.html │ ├── blogarchive │ │ ├── list.html │ │ └── summary.html`  
    In `list.html` I'm using `{{ .Render "summary" }}` and I would expect that `summary.html` out of my section would be used. Instead it loads `summary.html` from `_default`. Which is in my case located in the theme's directory.
    
    Do I miss something here? Is it correct what is written in the documentation? Maybe it's not true for my case?
    
    I'm using a workaround by placing `mysummary.html` in `_default` and referencing that. That works fine but I would like to know if there is any misconception on my side.

After which, @bep (Bjørn Erik Pedersen) added

    This is a little light on context, but I'll take a guess:
    
      * Since (currently) .Render only supports regular pages, I assume you call .Render inside the list loop.
      * So the “.” context is the Page; you would then need to look at the Page's type to decide which template is chosen, and so it ends up in _default.

@mgmart (Mgmart) replied

    Thank you very much for your explanation .
    
    Indeed I call `.Render` out of the list loop
    [code] 
        {{ range .Pages}}
          {{ .Render "summary" }}
        {{ end }}
        
    [/code]
    
    I moved `summary.html` to the according section - `post` in my case - and it renders nicely.


{'source': 'discourse', 'url': 'https://discourse.gohugo.io/t/render-does-not-find-my-template/6913', 'title': '.Render does not find my template', 'views': 390, 'has_accepted_answer': False, 'word_count': 262, 'like_count': 0, 'reply_count': 2, 'participant_count': 2, 'posts': 3, 'tags': '', 'author': '@mgmart (Mgmart)', 'participants': '@mgmart (Mgmart), @bep (Bjørn Erik Pedersen)', 'image_url': [None], 'created_at': '2017-06-08T13:01:52.230Z', 'last_posted_at': '2017-06-08T13:28:17.705Z'}