Skip to content

Render partial deep views  #696

@bigforcegun

Description

@bigforcegun

Description

Just unusual behavior with render partials and views in deep subfolders - we need to specify full path from project root

Steps to Reproduce

  1. Just create some partials like this
src/views/shared/
├── deep
│   └── _menu.html.slang
└── _menu.html.slang
  1. place into view == render(partial: "shared/_menu.html.slang")

all works fine

  1. place into view == render(partial: "shared/deep/_menu.html.slang")

we have error
Slang template: shared/deep/_menu.html.slang doesn't exist. (Exception)

  1. place into view == render(partial: "src/views/shared/deep/_menu.html.slang")
    all ok

Expected behavior: I do not have to specify the full path from project root to subfolder partials

Actual behavior: If my partial view is in a deep subfolder - I have to specify the full path from project root

Reproduces how often: 100%

Versions

Amber CLI (amberframework.org) - v0.6.7

Crystal 0.24.2 [4f9ed8d03] (2018-03-08)

LLVM: 4.0.0
Default target: x86_64-unknown-linux-gnu

OS: Ubuntu 17.10 artful

Additional Information

It's just an unusual behavior.
It just takes time to figure out how it should work.
It's not intuitive.
But this is not a critical bug, so just a question, will you do anything about it?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions