Jump to content

How to create TOC Table of Content in an article like in WHMCS docs

Recommended Posts


Is there a way to generate the TOC inside an article just like the Contents (TOC) in WHMCS documentation?




Share this post

Link to post
Share on other sites

There is nothing. Or, to be 100% clear, there was nothing till some months ago. I also need it to create documentations for my modules. By the end of September I'll modify my Legal Agreements mod which actually is an Articles mod, to support this.


Share this post

Link to post
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.

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.

  • Similar Content

    • By JesusSuarz
      sometimes the client can have 2 emails.
      one for your account details and one for the account owner.
      I need to know if the account owner's email is verified.
      The var: 
      $client = Menu::context("client"); gets the email that the customer has in the account details, however this is not the email owner of the account.
      I hope to make myself understood correctly.
    • By Kamran
                 I'm developing a module to setup a user on my server and sync their usage data to whmcs. I've successfully contextualized usage metrics now the big issue here is how whmcs track usage metrics my progress so far is below:
      I've created a new class which implements "ProviderInterface" below is the code for "metrics" function public function metrics() { return [ new Metric( 'disk', 'Disk Utilized', MetricInterface::TYPE_SNAPSHOT, new MegaBytes, new Usage(0) ) ]; } usage function is public function usage() { $serverData = $this->apiCall('stats'); $usage = []; foreach ($serverData as $data) { $usage[$data['username']] = $this->wrapUserData($data); } return $usage; }  
      tenantusage function is  public function tenantUsage($tenant) { $userData = $this->apiCall('user_stats'); return $this->wrapUserData($userData); } helper wrapuserdata function is:
      private function wrapUserData($data) { $wrapped = []; foreach ($this->metrics() as $metric) { $key = $metric->systemName(); if ($data[$key]) { $value = $data[$key]; $metric = $metric->withUsage( new Usage($value) ); } $wrapped[] = $metric; } return $wrapped; } And lastly helper apicall function which delibrately sends a value somewhat emulating an api call for now.
      private function apiCall($action) { if($action == "stats"){ return [ [ "username" => "kamran@domain.com", //this represents my username which is provided to whmcs "disk" => 100 ] ]; } else{ return [ [ "disk" => 100 ] ]; } }  
      Okay so far in the above mentioned code, date and time updates but usage details are not updating. BTW I'm checking metrics using module parameters using $params["metricStats"][0]["currentvalue"]
      So please help me with the below mentioned questions.
      What is the correct way to return "usage()" function  including what should be the identifier of the tenant(i.e. the key of value  usage object where key should be serviceid?accountid?userid? of the tenant)?
      Whenever cron job "TenantUsageMetrics" runs only "usage()" function is invoked and never "tenantusage()" why?
      Also if my syntax is wrong a possible example would be tremendous.
      Thank you for hearing me out!
    • By Kian
      Mercury is a revolution for WHMCS, a feature-rich platform designed to simplify user interaction.
      You can manage News, Docs, Changelog, Development and much more, in one place, quickly and intuitively.
      Discover / Purchase »
      Start spreading the News!

      Mercury provides you with a News section to communicate with your customers. Everything is perfectly integrated, with as many as 3 widgets available.
      Thanks to the author profile, signature, role and profile image are customizable by each administrator Scheduled automated publishing tool You will easily manage the creation and publication of news and establish a link with your readers.

      A Docs section always available to show your customers the features and the use of products and make learning faster.
      Each product is a category General categories for articles not concerning specific products Anchor navigation within the articles By providing detailed documentation, you will be able to simplify and streamline ticket support. Your customers will find most of the information they need here.
      Welcome to the Lab!

      Lab is a new concept. A meeting point where customers actively participate in product development.
      Make a request for a Feature or a Bug-fix in a few steps Get and organize customer feedback in a snap Rating system to rate existing features Dedicated widgets available, for a perfect integration Now you can focus on important things. Thanks to the ranking algorithm you will immediately know which features are most interesting for your users. A small revolution in your development model.
      Changelog? Done

      With Mercury comes one more big news. You can show everyone the evolution of your projects and inform customers about changes in your releases.
      Each release will have an associated changelog Real-time changelog creation interface Ability to add images to the changelog Intuitive and accessible frontend template, with dedicated widget Finally the changelog is gonna be quick to write and very easy to browse.
      Your control center

      Given the large number of features, you need a place to keep everything under control. The Dashboard is designed for this, Mercury at a glance.
      For each section, display what require your attention Add and organize notes on the fly directly in the to-do list The Dashboard is your starting point, an overview of what's going on and a quick access point for all of the Mercury sections.

      Mercury automatically manages URL rewriting for News, Documentation, Lab and Changelogs to consolidate your presence on the web.
      Locale specific Friendly URL Safe from duplicate content Proper use of canonical URL We took care of everything even of the maleficent Black Hat SEO techniques implementing features that automatically detects and nullify these activities.
      Katamaze technology

      Mercury includes a number of proprietary technologies that enhance the user experience for both the administrator and visitors.
      SorTables for displaying data Multilingual content with HereLang Optimal data entry with MagicInput Discover / Purchase »
      Screenshots - Click to expand

      Discover / Purchase »
  • 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