Article Index



Editing  categories' layout using the category view

Proceeding as I usual do with any MVC Joomla! extensions, I  copy components\com_virtuemart\views\category\tmpl 's content in \templates\ja_purity\html\com_virtuemart\category directory and start editing it in order to modify our category template. So here it's how my template directory looks like



Now i can edit default.php in order to style the category page in a way i like, maybe adopting it to ja_purity colour scheme.

This is how the standard default.php displays inside ja_purity: we are browsing Power Tools, at the top we find Power Tools' subcategory - Outdoor and Indoor Tools - and then products belonging to Power Tools are listed.


What if i want to override this layout ? just edit the default.php in \templates\ja_purity\html\com_virtuemart\category . So, for example, let's add an html line to this layout, a simple funny text: i edit default.php and place this snippet at line 23  (please note i'm closing and reopening php tags as i'm already in a php context at that line)

<h1> Yo brother, this is an html line!</h1>


And here it comes


Because default.php represents the default category template this modification will take place in other categories too, like Hand Tools



Cookies make it easier for us to provide you with our services. With the usage of our services you permit us to use cookies.
More information Ok Decline