PlaidWeb / Publ

Flexible publishing system for the web
http://publ.beesbuzz.biz/
MIT License
40 stars 4 forks source link

Add direct entry retrieval and relative image fetching #577

Closed fluffy-critter closed 2 months ago

fluffy-critter commented 2 months ago

Summary

Adds a get_entry(id) template function, and context-relative functions for doing entry-relative image retrieval

Detailed description

get_entry is a new function that allows retrieving a specific entry by entry ID, if available to the current user.

The Entry, Category, and Template classes now have an image method which allows retrieving an image from their respective contexts. This is useful for doing relative image resolution.

Test plan

The template entry-retrieval.html retrieves two hardcoded entry IDs, and also attempts to resolve an image from both of them.