× Here you will find Tips & Trix for the VMuikit component.

Change the code to get title of the Category at the top of the page

1 year 7 months ago
Posts: 4
More
Topic Author
Change the code to get title of the Category at the top of the page #5438
Hi. I wanna change the title of the Category page to show the title of the Category instead showing "Categories".

Before you have this string:
<?php echo '<h3 class="uk-h3">'.JText::_('COM_VIRTUEMART_CATEGORIES').'</h3>';?>

How can I put this message in this string?
$this->category->category_name

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

1 year 7 months ago
Posts: 4
More
Topic Author
Change the code to get title of the Category at the top of the page #5439
This work, but it display all categories in h3 style. How can I solve this?

echo '<div class="uk-panel uk-card uk-card-default uk-card-small uk-card-body uk-border-rounded uk-margin-bottom">';
echo '<h3 class="uk-h3">' .$this->category->category_name; '</h3>';
$lPath = $vmuikitmodel->getVmSubLayoutPaths('categories');

$categories = $this->category->children;
$viewData = array('categories'=>$categories);
if($lPath)
{
ob_start ();
include ($lPath);
echo ob_get_clean();
}
echo '</div>';
Attachments:

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

1 year 7 months ago
Posts: 4
More
Topic Author
Change the code to get title of the Category at the top of the page #5440
I solved it:

I had to use . instead of ; after the string.

echo '<h3 class="uk-h3">' .$this->category->category_name. '</h3>';

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

Time to create page: 0.108 seconds
Powered by Kunena Forum

Latest News from JoomlaPro.com

VMuikit 5 is finally out!

Our next version of our popular VMuikit package is out. This time we have some quite nice new features.

Electroneum Joomla/VirtueMart plugins

JoomlaPro.com are not only web & Joomla enthusiast, we cannot stay away from checking other tech trends as well. The last few years its been hard to miss the crypto/blockchain ...

New plugin: Secure Joomla Login

We have released a new plugin that adds a extra PIN code and a reCaptcha v2 check on Joomlas login. Security is very important on all fronts of a website. One often missed one is ...

We accept PayPal, 2Checkout & Electroneum payments:

We accept PayPal payments    We accept 2checkout payments  electroneum payment


For news and updates please like :