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

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

Ryza

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
    šŸ‘ 󠁮󠁮󠁮󠁮 šŸ‘Ž 󠁮󠁮󠁮󠁮

    freedit    2023-04-10 šŸ‘ šŸ‘Ž

    only homepage or everypage?

    if only homepage, you should add inn_name and iid in page_inn

    1

    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

    freedit    2023-04-10 šŸ‘ šŸ‘Ž

    @Ryza if you want to add it to all pages, just add it in PageData and then fix every error that it introduced.

    3