Keyword
Please note that official support for commercial extensions & templates is provided in the Subscriber Help Desk.
Support requests should ONLY be directed there and require an active subscription plan.
This forum board is to be used for archive purposes and knowledge exchange ONLY.

How to override menu item name on header

  • Felipe
  • Felipe's Avatar Topic Author
  • Offline
  • Senior Member
More
5 years 3 months ago #138580 by Felipe
Felipe created the topic: How to override menu item name on header
On the homepage i have a menu item named "Inicio". That's fine but I would love to see "Revista digital de Arte y cultura" on homepage header (without changing the name of the menu item).
Is there a way to accomplish this?

Regards,
Felipe Z.

Please Log in or Create an account to join the conversation.

More
5 years 3 months ago #138581 by Krikor Boghossian
Krikor Boghossian replied the topic: How to override menu item name on header
That is the active menu's title.
Unfortunately it cannot be the Page heading since it would appear in other components as well.

You can change your home's title or use this little PHP snippet in your homepage.
				<?php $active = $menu->getActive(); ?>
				<?php if($isFrontpage): ?>
				<h4 class="text-center">HOME PAGE TITLE HERE</h4>
				<?php else: ?>
					<?php if($active->title): ?>
					<h4 class="text-center">
					<?php
						echo $active->title;
					?>
					</h4>
					<?php endif; ?>
				<?php endif; ?>
				<?php endif; ?>

This performs a check and renders a custom title on the homepage.

Replace the block in index.php with this snippet.

IMPORTANT: Please search the forum before posting a question!

JoomlaWorks Support Team Member

---
JoomlaWorks
www.joomlaworks.net/

Please Log in or Create an account to join the conversation.

  • Felipe
  • Felipe's Avatar Topic Author
  • Offline
  • Senior Member
More
5 years 3 months ago #138582 by Felipe
Felipe replied the topic: How to override menu item name on header
You did it again! Thanks Krikor, it worked perfectly.

Regards,
Felipe Z.

Please Log in or Create an account to join the conversation.

More
5 years 3 months ago #138583 by Krikor Boghossian
Krikor Boghossian replied the topic: How to override menu item name on header
You 're welcome Felipe.

IMPORTANT: Please search the forum before posting a question!

JoomlaWorks Support Team Member

---
JoomlaWorks
www.joomlaworks.net/

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum