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
11 years 4 days ago #138580 by Felipe
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.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
11 years 1 day ago #138581 by Krikor Boghossian
Replied by Krikor Boghossian on 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.

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

  • Felipe
  • Felipe's Avatar Topic Author
  • Offline
  • Senior Member
More
11 years 1 day ago #138582 by Felipe
Replied by Felipe on 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.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
11 years 23 hours ago #138583 by Krikor Boghossian
Replied by Krikor Boghossian on topic How to override menu item name on header
You 're welcome Felipe.

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


Powered by Kunena Forum