KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I’d like to list the files which are in directories and subdirectories. I have used this answer to have the list, but the items are non-clickables, so I’d like to add a link between the name of the files and their locations. I have try to modify the template with something like this : <!doctype html> <title>Path: {{ tree.name }}</title> <h1>{{ tree.name }}</h1> <ul> {%- for item in tree.children recursive %} <li><a href="{{ item.name }}">{{ item.name }}</a> {%- if item.children -%} <ul><a href="{{ loop(item.children) }}">{{ loop(item.children) }}</a></ul> {%- endif %}</li> {%- endfor %} </ul> But it doesn’t work, the links are not good. Wheareas I want a link to http://192.168.0.70:5000/static/repertory/subrepertory/file , I have a link to http://192.168.0.70:5000/file , which leads to a 404. Can somebody help me ?
Tags (comma-separated)
Save Edits
Cancel