PhoenixKit.Modules.Publishing.Web.Controller.Listing (phoenix_kit v1.7.33)
Copy Markdown View SourceBlog listing functionality for the publishing controller.
Handles rendering blog post listings with:
- Language filtering and fallback
- Pagination
- Translation link building for listings
Summary
Functions
Gets the default blog listing path for a language.
Fetches blog configuration by slug.
Filter posts to only include those that have a matching language file. Handles both exact matches and base code matches (e.g., "en" matches "en-US"). Uses preloaded language_statuses to avoid redundant file reads.
Strict version - only matches exact language, no fallback to base code.
Filters posts to only include published ones.
Find a matching language in available languages. Handles exact matches and base code matching.
Get the actual language that the fallback matched. Used to redirect to the correct URL when requested language has no content.
Gets the page number from params.
Gets the posts per page setting.
Paginates a list of posts.
Renders the blog index page with resolved posts.
Renders a blog listing page.
Resolves posts for the requested language, handling exact match vs fallback.
Functions
Gets the default blog listing path for a language.
Fetches blog configuration by slug.
Filter posts to only include those that have a matching language file. Handles both exact matches and base code matches (e.g., "en" matches "en-US"). Uses preloaded language_statuses to avoid redundant file reads.
Strict version - only matches exact language, no fallback to base code.
Filters posts to only include published ones.
Find a matching language in available languages. Handles exact matches and base code matching.
Get the actual language that the fallback matched. Used to redirect to the correct URL when requested language has no content.
Gets the page number from params.
Gets the posts per page setting.
Paginates a list of posts.
Renders the blog index page with resolved posts.
Renders a blog listing page.
Resolves posts for the requested language, handling exact match vs fallback.