Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8832215
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T08:28:42+00:00 2026-06-14T08:28:42+00:00

Am using WHMCS, and trying to create a separate file for my header menu.

  • 0

Am using WHMCS, and trying to create a separate file for my header menu. The header menu is a multidimensional array, and I wanted it to be kept separate for my own sanity sake.

I created a .php page with the MySQL code as such:

<?php ... 
# To assign variables to the template system use the following syntax.
# These can then be referenced using {$variablename} in the template.
$smartyvalues["variablename"] = $value; 

$list = array();
$result = full_query("SELECT id,title,slug,parent FROM `pages` WHERE title!='404' AND slug!='404'");

...
$smartyvalues["header"] = $list;
# Define the template filename to be used without the .tpl extension
$templatefile = "headermenu"; 
outputClientArea($templatefile);
?>

The headermenu.tpl shows the menu as it should, but when I try to include the file elsewhere, the menu is blank. I add some static content, and that shows. I tried using both {include} and {include_php} to no avail. Any idea how I can show my MySQL result without directly putting it into the file I need it in?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T08:28:43+00:00Added an answer on June 14, 2026 at 8:28 am

    I could not figure out a way to include the file through .tpl, so I created a .php and included it with {include_php}. The .php had my MySQL code, and after including the file, I was able to show the MySQL result as needed.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to insert some extra client details using WHMCS API's 'add client'.
Using ASIHTTPRequest, I downloaded a zip file containing a folder with several audio files.
I need to get a script working for our billing system (WHMCS) using their
Using Jenkins or Hudson I would like to create a pipeline of builds with
Using Java,I have to fetch multiple sets of values from an XML file to
Using linq2sql I'm trying to take the string in txtOilChange and update the oilChange
Using the navigator.geolocation object in JavaScript. Trying to establish accurate ranges, but wondering exactly
Using Rails 3.2.0 with haml, sass and coffeescript: Basically I am trying to disable
Using the HTML5 File API I can get the Binary String representation of a
Using CSS, how can I create a partial border as per image below I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.