Author Topic: Change Header position  (Read 330 times)

bestcons

  • Jr. Member
  • **
  • Posts: 89
Change Header position
« on: March 12, 2021, 07:32:11 am »
Our Historical Society website presents large amounts of Photo's as Articles (amongst others). We have made a top-category Photo's, sub-categories such as Schools and sub-sub categories for named schools such as Medlerschool (See attachments of screen images).
Unfortunately the lay-out of the various categories differ and we have not been able in the VM Configuration to position the (sub)-category names as Headers on top and the Navigation as trailers.
We use Joomla 3.9.25 and VM 3.8.8.
Please advice.

pinochico

  • 3rd party VirtueMart Developer
  • Full Member
  • *
  • Posts: 1091
    • MiniJoomla
  • Skype Name: support-easysoftware
  • VirtueMart Version: 3
Re: Change Header position
« Reply #1 on: March 12, 2021, 08:15:54 am »
Quote
we have not been able in the VM Configuration to position the (sub)-category names as Headers

Yes, you can but not in admin -  in PHP file for category layout - move manually.
www.minijoomla.org  - new portal for Joomla!, Virtuemart and other extensions
XML Easy Feeder - feeds from products, orders and database table
Virtuemart Email Manager - customs email templates

bestcons

  • Jr. Member
  • **
  • Posts: 89
Re: Change Header position
« Reply #2 on: March 12, 2021, 16:02:22 pm »
I am able to change in php, but only if someone else is so kind to describe the recipe.

pinochico

  • 3rd party VirtueMart Developer
  • Full Member
  • *
  • Posts: 1091
    • MiniJoomla
  • Skype Name: support-easysoftware
  • VirtueMart Version: 3
Re: Change Header position
« Reply #3 on: March 12, 2021, 16:03:58 pm »
then you have to send image with ecactly position :)
www.minijoomla.org  - new portal for Joomla!, Virtuemart and other extensions
XML Easy Feeder - feeds from products, orders and database table
Virtuemart Email Manager - customs email templates

bestcons

  • Jr. Member
  • **
  • Posts: 89
Re: Change Header position
« Reply #4 on: March 12, 2021, 16:20:26 pm »
You can see this in red on the 3 attachments. Thank you, don't hesitate if you need more information.

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 10118
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.6.8
Re: Change Header position
« Reply #5 on: March 12, 2021, 16:26:33 pm »
if your template is reasonably std. then the header is

<?php if (!empty($this->category->category_name)) { ?>
<h1><?php echo vmText::_($this->category->category_name); ?></h1>
<?php } ?>

so move the

// Show child categories
if ($this->showcategory and empty($this->keyword)) {
   if (!empty($this->category->haschildren)) {
      echo ShopFunctionsF::renderVmSubLayout('categories',array('categories'=>$this->category->children, 'categories_per_row'=>$this->categories_per_row));
   }
}

below that

same for the clearly commented search block

templates\YOURTEMPLATE\html\com_virtuemart\category\default.php
GJC Web Design
VirtueMart and Joomla Developers - php developers http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

bestcons

  • Jr. Member
  • **
  • Posts: 89
Re: Change Header position
« Reply #6 on: March 12, 2021, 21:20:26 pm »
Unfortunately
<?php if (!empty($this->category->category_name)) { ?>
<h1><?php echo vmText::_($this->category->category_name); ?></h1>
<?php } ?>
was not found in the default.php of the template. The file is attached.