{{inn.name}} {% endfor %} in layout.html, it shows an error. How can I correctly call it? thx">

How to call the name and image of an inn list in layout.html?

āš“ Dev    šŸ“… 2023-04-08    šŸ‘¤ Ryza    šŸ‘ļø 197      

Ryza

Warning

This post was published 172 days ago. The infomation described in this article may have changed.

I want to display the inn list on the left side of the homepage. When I directly use the code

{% for inn in inns %}

  • {{inn.name}}
  • {% endfor %}

    in layout.html, it shows an error. How can I correctly call it?

    thx

    šŸ·ļø Inn List

    Ryza    2023-04-10 šŸ‘ šŸ‘Ž [op]

    @freedit Yes, I want to display the inn list on the left side of all pages. I used the method you gave, but there is still no way to report an error. I’m not sure if it is used correctly.

    2