Structure
ItemRenderingContext
struct ItemRenderingContext<M> where M : MetadataThe rendering context passed to an itemWriter(_:) renderer.
Contains the single item being rendered, along with all items from the same processing step, all items across all steps, neighboring items for navigation, and any unhandled files (resources) in the same folder as the item.
Instance Properties
let allItems: [any AnyItem]All items across all registered processing steps. When i18n is configured, this only contains items for the current locale.
let item: Item<M>The item being rendered.
let items: [Item<M>]All items from the same processing step, in sorted order.
let locale: SagaLocale?The locale of this rendering context, or nil when i18n is not configured.
let next: Item<M>?The next item in sorted order, or nil if this is the last item.
let previous: Item<M>?The previous item in sorted order, or nil if this is the first item.
let resources: [Path]Unhandled files in the same folder as the item, such as images or other static files.
let subfolder: Path?The subfolder name when using nested:. Nil otherwise.
let translations: [SagaLocale : String]URLs for this page in other locales.
Instance Methods
func asDictionary() -> [String : Any]Relationships
Conforms To
DictRenderingContext , Swift.Copyable , Swift.Sendable