News:

Looking for documentation? Take a look on our wiki

Main Menu

Virtuemart 2 background category title

Started by ostebe, December 09, 2012, 15:26:14 PM

Previous topic - Next topic

ostebe

Hello,

Please help me to solve the two deficiencies in virtuemart 2

1. How can I add a background to the category name in category details page (link http://instalatii.dianrom-ital.ro/categorii/elemente-de-fixare - eg title "Conexpanduri be a gray backround, only the world title and not the photo related ")

2. I tried to put as many products 2/row .... path Configuration / Template / Default number of products in a row - I could not ... go 1,3,4 ... etc. and not 2, I actually tried to 6 every function less 2.

Thank you!

bytelord

Hello,

For your first one just use some CSS. The best option is to load a new CSS file inside your template header, e.g. virtuemart.css and placed it under your css folder for example under your joomla template. Inside there you can override everything regarding to vm2 css styling.  (http://forum.virtuemart.net/index.php?topic=90968.0)
Alternative you could use the your template.css file to override you CSS and the better will be to create a new one ... please provide a live url to check your site with firebug also.

On your first question CSS,

.category-view .row .category .spacer h2 a title {
background-color:grey;
}

Use firebug to examine you site code and css styling: https://forum.virtuemart.net/index.php?topic=102850.0
Also here some information regarding css styling: http://www.w3schools.com/css/
-----

On your second question i don't understand what you want to do ...  As i see you haven't place it to 2, but to 1 ... if you have it please try without template overrides and also use firebug to examine the style from your template that possible could infect the row styling (width).

Regards


Production: Joomla 2.5.8 | VM 2.0.14 | PHP 5.3.13
Testing     : Joomla 2.5.8 | VM 2.0.16 | PHP 5.3.8
Testing     : Joomla 2.5.8 |    VM 2.1   | PHP 5.3.8

- Don't Forget to mark thread as solved when it is solved!
- Please do not PM with support questions, use the forum!


bytelord

yes,

i had your link, sorry for asking it again. Please test the css i gave you and also follow the instructions using firebug. The css is based on your link

Regards
Production: Joomla 2.5.8 | VM 2.0.14 | PHP 5.3.13
Testing     : Joomla 2.5.8 | VM 2.0.16 | PHP 5.3.8
Testing     : Joomla 2.5.8 |    VM 2.1   | PHP 5.3.8

- Don't Forget to mark thread as solved when it is solved!
- Please do not PM with support questions, use the forum!

ostebe

I tried this solution but it did not work

bytelord

Hi,

??
But i test it with firebug and is working ... did you clean your browser cache? Did you test it using firebug?

Regards
Production: Joomla 2.5.8 | VM 2.0.14 | PHP 5.3.13
Testing     : Joomla 2.5.8 | VM 2.0.16 | PHP 5.3.8
Testing     : Joomla 2.5.8 |    VM 2.1   | PHP 5.3.8

- Don't Forget to mark thread as solved when it is solved!
- Please do not PM with support questions, use the forum!

ostebe

I changed style.css and it did not work
I tried with vmsite-ltr.site .... did not work

I was wrong somewhere?

Sorry for insisting, but it's very important for me

bytelord

Yes,

you have right, if you want only the a title then you should create a span or div under under your custom template file for category view to separate the h2 tag from the image and after use for your CSS:

.category-view .row .category .spacer h2 {
background-color:grey;
}

Regards
Production: Joomla 2.5.8 | VM 2.0.14 | PHP 5.3.13
Testing     : Joomla 2.5.8 | VM 2.0.16 | PHP 5.3.8
Testing     : Joomla 2.5.8 |    VM 2.1   | PHP 5.3.8

- Don't Forget to mark thread as solved when it is solved!
- Please do not PM with support questions, use the forum!

ostebe

I'm sorry ... but I'm a beginner
... can you explain how to do this?

thanks

bytelord

Hello,

You should create a template override for the category view ... so the category page default template for example is located under joomla_folder\components\com_virtuemart\views\category\tmpl\default.php
To override it just copy the file to your_joomla_folder\templates\your_joomla_template\html\com_virtuemart\category\default.php
If the folders does not eixst on the destination, create them. This a template override and where the category pages are located.

Find where the a href is been displayed and separate the link with the title ... then apply your CSS. Please

Like,
<span class="prodtitle">
echo title ....
</span>

and then your image with the link ...

Use firebug to examine you site code and css styling: https://forum.virtuemart.net/index.php?topic=102850.0

Template Overrides:
Creating Template overrides: https://forum.virtuemart.net/index.php?topic=98505.0
Template System: https://dev.virtuemart.net/projects/virtuemart/wiki/Hints_for_the_use_of_the_template_system

Also take a look on the fields usage:
Product Fields: http://forum.virtuemart.net/index.php?topic=92756.0
Category fields: http://forum.virtuemart.net/index.php?topic=97744.0
$this vs $product: http://forum.virtuemart.net/index.php?topic=100696.0
Production: Joomla 2.5.8 | VM 2.0.14 | PHP 5.3.13
Testing     : Joomla 2.5.8 | VM 2.0.16 | PHP 5.3.8
Testing     : Joomla 2.5.8 |    VM 2.1   | PHP 5.3.8

- Don't Forget to mark thread as solved when it is solved!
- Please do not PM with support questions, use the forum!