Skip to content
Available for new work
Pages in Blog

GuidePremium

Views you can override in CoullWorks Blog for Laravel

Where each public view lives, how to override it, what variables it receives, the layout contract and the slots (post-cta, post-after-content and the rest), with a screenshot of every page.

Updated 16 November 2026Back to the package pageBuy

Every public page is a Blade view. You can change any of them without touching the package: publish a copy, edit it, and your copy wins. This page lists each view, where it lives, what it receives and what it draws. The component and view tables in the front ends reference list every file; this page explains the ones you are most likely to change.

How to override a view#

  1. Publish the whole set for your style:

    bash
    php artisan vendor:publish --tag=cwb-blade-views-tailwind
    # or
    php artisan vendor:publish --tag=cwb-blade-views-bootstrap

    The files are written to resources/views/vendor/coullworks-blog.

  2. Delete the files you do not want to change. Laravel looks in resources/views/vendor/coullworks-blog first, then in the package, so a published file you keep is used and one you delete falls back to the package. Keeping only the files you changed makes package updates easier to merge.
  3. Edit the file you kept. Reload the page.

Three views belong to the comments module and have their own folder. See the comments views below.

Every page view starts with @extends($cw->layout()) and pushes its head tags with @push('cw-head'). $cw is the page helper (links, dates, images, the active view set), and these variables are given to every page:

VariableWhat it is
$blogThe blog being shown (name, default locale, domain)
$localeThe language of the page, such as en
$seoThe head data: title, description, canonical, robots, alternates, structured data
$cwThe page helper
$setThe active view set, tailwind or bootstrap
$nowThe current time

The listing view#

The blog home page

The home page, drawn by pages/listing.blade.php: the heading, the category pills, the wide lead card and the grid of cards.

resources/views/{tailwind,bootstrap}/pages/listing.blade.php draws the home page and also the category, tag, author and archive pages. A category, tag, author or archive page has the same structure with a breadcrumb and a different heading. Besides the shared variables it receives:

VariableWhat it is
$viewThe listing view object: its kind, title, the category, tag or author when there is one, and the featured cards
$listingThe page of posts, the page number, the last page and the post extras
$pagerThe previous, next and numbered page links
$slotsRendered extras per slot name, for cw-card-meta
$authorThe author, on an author page
$sidebarThe widget names to show beside the list, from the setting widgets.sidebar. Empty: no sidebar
$navThe category filter items, when listing.category_nav is on
$currentCategoryIdThe category being shown, to mark its pill current

The article view#

The top of an article: breadcrumbs, kicker, title, standfirst, byline and hero image

The top of an article, drawn by pages/post.blade.php: breadcrumbs (Field Notes, Guides, then the title), the GUIDES kicker, the title, the standfirst, the byline with both authors and "8 min read", then the hero image.

resources/views/{tailwind,bootstrap}/pages/post.blade.php draws one article, including the rail, the author box, previous and next links and related posts. It receives:

VariableWhat it is
$pageThe post, its translation for this language, the authors, categories and tags, the extras, and whether it is a draft preview
$blocksHtmlThe post body, already rendered from its blocks
$tocThe h2 and h3 headings, for the contents
$neighboursThe previous, next and related posts
$slotsRendered extras per slot name
$shareUrlThe address of the article, for the share links
$railWhat the rail shows: contents, key takeaways, the authors and related posts
$cwHighlighttrue when the post has a code block, so the code highlighter script is added

The measures and the order of the sections are in Tokens and theming. A preview of an unpublished post uses the same view, is never cached publicly and carries noindex,nofollow.

The search view#

The search page with the word tent typed and one result

The search page, drawn by pages/search.blade.php, with "tent" searched. The box is labelled Search the blog, and under it the line "1 result for "tent"" and the one matching card.

resources/views/{tailwind,bootstrap}/pages/search.blade.php draws the search box and the results. It receives $result (the posts, the total, the page and the last page), $term (the search text), $pager, $sidebar, $highlight (whether to mark matched words) and $suggest. $suggest is set only when there are no results: it holds up to four recent posts and the active tags.

The search page with a search that matched nothing: a notice, recent posts and topics

A search for "zebra" with no match. The page says "No results for "zebra"", shows a grey notice "Nothing matched your search" with a Back to all posts link, then a Recent posts grid and a Topics row of tag pills (Beginners, Camping, Packing, Weather) so the reader has somewhere to go.

Searches are limited per address by coullworks-blog.search.throttle (30 a minute by default). Past the limit the reader gets the 429 page below.

The not found view#

The not found page: Page not found, a short line and a link back

The not found page, drawn by pages/errors/404.blade.php: the heading "Page not found", the line "We could not find that page." and a Back to all posts link, inside the normal header and footer. It is sent with a 404 status.

pages/errors/404.blade.php receives $languages. It is a list of {locale, url} for the other languages when the address matched a post that exists in another language but not in this one. The view then says "This post exists in other languages:" and shows one small pill per language (EN, FR), each a link to that language's version. With no other language the list is empty and only the link back to the home page shows. The page is noindex,follow.

The too many requests view#

The too many searches page: a notice with the seconds to wait

The 429 page, drawn by pages/errors/429.blade.php: the heading "Too many searches", a grey notice "You have searched too often. Try again in 27 seconds." and a Back to all posts link.

pages/errors/429.blade.php receives $retry, the number of seconds to wait, taken from the Retry-After header, which the response also carries. It is shown only for the search page. It is noindex,nofollow and is never cached.

The comments section view#

The comments section: four comments with a staff reply, and the Leave a comment form

The comments section under an article: a "Comments (4)" heading, three top-level comments with one staff reply (a blue Staff badge, indented), and the Leave a comment form with Name, Email, Comment, the Email me when someone replies box and a Post comment button. Every comment has a Reply link.

The comments section belongs to the comments module, so its view is in a different place from the page views. The file is resources/views/{tailwind,bootstrap}/comments.blade.php in the package, loaded as the coullworks-comments view namespace. To override it, publish it with php artisan vendor:publish --tag=cwb-comments-views and edit the copy in resources/views/vendor/coullworks-comments/tailwind/comments.blade.php (or bootstrap). A copy in resources/views/vendor/coullworks-blog is not used for it.

The view receives $extra (the thread, the comment count, the paging data, whether comments are open, the form fields and addresses, the post id, the language and the maximum length) and $ui, the class names. What readers see and how it works is in Reader comments.

The unsubscribe views#

unsubscribe.blade.php and unsubscribed.blade.php are the two pages of the reply email's Unsubscribe link. They are server-rendered by the comments module in every front end, in the view set the blog uses, and are published and overridden the same way as the comments view above (--tag=cwb-comments-views).

  • Unsubscribe (unsubscribe) is what the link opens. It is titled "Stop reply emails", says "You asked to be emailed when someone replies to your comment on" the post title, and has one button, Stop these emails. Opening the page changes nothing, so a mail scanner that fetches the link does no harm. It receives $post_title, $action (the address the button posts to), $blog_name and $locale.
  • Unsubscribed (unsubscribed) is what the button leads to. It is titled "Emails stopped" and says "You will not get further replies for this comment." It receives $post_title, $blog_name and $locale.

Both are sent no-store, noindex, nofollow and Referrer-Policy: no-referrer.

The Stop reply emails page: the heading, the line You asked to be emailed when someone replies to your comment on How to choose a three-season tent. Confirm to stop these emails for that comment., and a blue Stop these emails button

The unsubscribe page on a 1440 px window.

The Stop reply emails page on a phone-width window

The same page at 390 px.

The Emails stopped page: the heading and a bordered box reading You will not get further replies for this comment.

The page after the button is pressed.

The Emails stopped page on a phone-width window

The same page at 390 px.

Layout contract and slots#

The article page: the rail on the left and the text on the right, with the header above

The regions of an article. The slots are regions inside it: post-meta in the byline, post-rail in the rail, post-cta under the text, post-after-content at the foot of the article, where the comments appear. Several are empty until a module or your own code fills them, so they are not visible in this capture.

Your own layout#

Set coullworks-blog.blade.layout to the name of your layout view. It must contain:

  • @yield('content') where the page goes, and
  • @stack('cw-head') in the <head>, where the page's title, canonical, hreflang and structured data are pushed.

If you also use the Livewire front end, add @livewireStyles and @livewireScripts. The package layout is a skip link, a header (blog name, Home, Search), the main region with the id cw-main, and a footer (copyright and feed link). Keep the skip link and the cw-main target in your own layout so keyboard users can jump to the content.

Slots#

A slot is a named region a module can put content into without you editing the view. Each is a Blade stack, drawn inside an element with a data-cw-slot attribute.

StackAliasWhere it is drawnWhat fills it by default
cw-post-metametaIn the byline of an articleThe AI disclosure line
cw-post-railrail, sidebarIn the article railNothing from the package's own modules
cw-post-ctactaUnder the article text, above the tagsNothing. It is the place for a newsletter or product band
cw-post-after-contentafter-contentAfter the author box and related postsThe comments section and the analytics block (reading time, related posts, popular posts)
cw-card-metacard-metaIn the meta row of every cardNothing from the package's own modules
cw-headnoneIn the <head>The page's head tags

To fill a slot from your own code, add a post extra: a class that implements the PostExtra contract (its slot() returns a name or alias from the table, its view() returns the partial for the active set, its toArray() the data) and a PostExtraProvider that returns it. The package then renders it into the right stack. An extra with no partial for the active view set renders nothing. Or, in a view you have published, @push('cw-post-cta') your own markup. The contracts are in the contracts reference.

In Inertia, the same slot names apply: registerExtra(type, Component, 'cta') puts a component in the call-to-action slot.

Available for new work

UK based · PHP · Python · JS · TS. Every first call is free.