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

  • SEARCH
  • Home
  • 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 7182881
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T17:51:54+00:00 2026-05-28T17:51:54+00:00

I am doing something to my client’s Joomla page. The code is like this:

  • 0

I am doing something to my client’s Joomla page. The code is like this:

$menu = JSite::getMenu(); 
$arr = (array)$menu->getActive(); 
$alias = $arr['alias'];

echo $alias;

if ($alias = "volunteering-2") {

    echo('<div class="item-page">   <h2>Volunteering</h2></div>');
}
else if ($alias = "contact-us2") {

    echo('<div class="item-page">   <h2>Contact Us</h2></div>');
}

The problem is, the Contact Us H2 header is never appear, even the if statement is correct.
You can see the page here: http://dzulhel.me/yyDk9m

Try to see the page in Volunteering and Contact Us

I try tackle using ID instead of alias but it still the same.

  • 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-05-28T17:51:55+00:00Added an answer on May 28, 2026 at 5:51 pm

    try this. think you’re missing “equal-to” sign.

    $menu = JSite::getMenu(); 
    $arr = (array)$menu->getActive(); 
    $alias = $arr['alias'];
    
    echo $alias;
    
    if ($alias == "volunteering-2") {
    
     echo('<div class="item-page">   <h2>Volunteering</h2></div>');
    }
    else if ($alias == "contact-us2") {
    
    echo('<div class="item-page">   <h2>Contact Us</h2></div>');
     }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am doing something like this in myproject.myapp.urls : from django.conf.urls.defaults import * urlpatterns
Doing something like this at the moment: try { while ((bytesRead = clientStream.Read(data, 0,
We receive fixed length datasets from a client that look something like this: 1
In my code right now I have something like this: state.BytesRead += readPacket.Result; if
I'm doing something like the following: Validate number of nested attributes . I'm checking
Perhaps I am doing something wrong while z-normalizing my array. Can someone take a
I'm doing something like zgrep somepattern access_log.X.gz But I find that a lot of
i'm trying to use C2DM client with this tutorial:http://www.vogella.de/articles/AndroidCloudToDeviceMessaging/article.html I'm using this code for
Am I doing something wrong with the server for https://github.com/adamvr/MQTT.js ? I see client.id
I'm attempting to use inet's tftp, but I'm doing something incorrectly. This simple example

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.