PhoenixKit.Modules.Publishing.Web.Controller.PostRendering (phoenix_kit v1.7.71)
Copy Markdown View SourcePost rendering functionality for the publishing controller.
Handles rendering individual posts including:
- Content rendering with caching
- Versioned post display
- Date-only URL handling
- Version dropdown building
Summary
Functions
Builds breadcrumbs for a post page.
Builds a timestamp URL with date and time.
Builds version dropdown data for the public post template. Returns nil if version access is disabled or only one published version exists. Uses listing cache for fast lookups.
Builds URL for a specific version of a post.
Gets version info from cache (allow_version_access and live_version). Falls back to DB reads if cache miss.
Handles date-only URLs (e.g., /group/2025-12-09). If only one post exists on that date, render it directly. If multiple posts exist, redirect to the first one with time in URL.
Checks if a specific post allows public access to older versions. Always reads from the primary language's live version to ensure consistency.
Renders a post after resolving URL slugs.
Renders post content with caching for published posts. Uses Renderer.render_post/1 which caches based on content hash.
Renders a post after identifier has been resolved.
Renders a specific version of a post (for version browsing feature).
Functions
Builds breadcrumbs for a post page.
Builds a timestamp URL with date and time.
Builds version dropdown data for the public post template. Returns nil if version access is disabled or only one published version exists. Uses listing cache for fast lookups.
Builds URL for a specific version of a post.
Gets version info from cache (allow_version_access and live_version). Falls back to DB reads if cache miss.
Handles date-only URLs (e.g., /group/2025-12-09). If only one post exists on that date, render it directly. If multiple posts exist, redirect to the first one with time in URL.
Checks if a specific post allows public access to older versions. Always reads from the primary language's live version to ensure consistency.
Renders a post after resolving URL slugs.
Renders post content with caching for published posts. Uses Renderer.render_post/1 which caches based on content hash.
Renders a post after identifier has been resolved.
Renders a specific version of a post (for version browsing feature).