Jump to content

Unable to Publish Custom Blog Module Pages in Antler Theme


Furkan Cakmak

Recommended Posts

Hello WHMCS Developer Community,

I’m building a custom blog module for WHMCS and integrating it into the Antler theme, but I can’t get the front-end pages to render. Here are the details:

  1. Module Structure

    • Module folder: modules/addons/blog/

    • Main file: modules/addons/blog/blog.php (activated successfully)

    • Page files:

      • modules/addons/blog/pages/index.php (formerly grid.php)

      • modules/addons/blog/pages/details.php

  2. Template Files

    • templates/antler/blog-grid.tpl

    • templates/antler/blog-details.tpl

  3. Routing & URLs

    • Accessing list: https://<domain>/index.php?m=blog

    • Accessing details: https://<domain>/index.php?m=blog&page=details&id=<post_id>

  4. Database & Data Retrieval

    • Using Capsule::table('mod_blog_posts')->get() and ->where('id', $id)->first()

    • Confirmed via print_r($posts) that data is fetched correctly.

  5. Problem

    • No errors in logs.

    • Visiting either URL immediately redirects back to WHMCS homepage.

    • Smarty cache cleared, Developer Mode and error display enabled, but still no output.

  6. What I’ve Tried

    • Renamed grid.phpindex.php as per WHMCS page conventions.

    • Added ?page=grid and ?page=details URL parameters.

    • Cleared Smarty cache and verified template filenames.

    • Inserted print_r() before return to confirm data presence.

  7. Request
    Could anyone advise on why WHMCS isn’t recognizing my addon pages or loading the Antler templates? Is there an additional hook or registration step I’m missing to expose m=blog as a client area route? Any sample code snippets or pointers would be greatly appreciated.

Thank you for your time and expertise!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated