VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: tserts on October 07, 2014, 00:40:27 AM

Title: Category title and description on a module
Post by: tserts on October 07, 2014, 00:40:27 AM
My client does not like that the basket on the right position isn't alligned with the product rows, because the category title and description "make it seem out of place"... So I thought of adding a module in one of my template's positions above main body the equivalent of this:

<h1><?php echo $this->category->category_name?></h1>

<div class="category_description">
<?php echo $this->category->category_description?>
</div>

<div class="clear"></div>
<br />
<div class="horizontal-separator"></div>


That way I will remove the above part from my default.php and the top row of my products will allign with the top of the basket. I want it to be dynamic since we have too many categories and it would be a pain to manually create separate modules for each category.... I have sourcerer, so I mainly want a way to query those values so that the above code will give proper output.

Any ideas?
Thanks.
Title: Re: Category title and description on a module
Post by: jenkinhill on October 07, 2014, 10:09:02 AM
"the basket on the right position" tells us absolutely nothing! An image or the URL would maybe show what you mean.
Title: Re: Category title and description on a module
Post by: tserts on October 07, 2014, 12:10:19 PM
Apologies, I meant I have placed a vm basket module on the right position. Have a look HERE (http://kidzbooks.tserts.info/book/first-reading/first-reading-level-one).
Title: Re: Category title and description on a module
Post by: jenkinhill on October 07, 2014, 13:01:26 PM
That is a Joomla template question, nothing at all to do with VirtueMart.  Suggest you use Firebug & work out if simply adding a top margin to the module will do the job.
Title: Re: Category title and description on a module
Post by: tserts on October 07, 2014, 13:33:52 PM
The description length is variable across categories, that's why I want to pull it out of the mainbody. Any spacer I put above the basket (very easy to do) will be static and will not work on some shorter or longer descriptions.