Quantcast
Channel: OXID Community Forum
Viewing all articles
Browse latest Browse all 6951

Adding images to products on the startsite

$
0
0
First of all thanks to Leofonic! His explanation was amazing.


I got a new exercise!

I want to add an image on all listened products on the startsite.

So, this sounds easy and i guess it also is very easy.

So i created 4 Files:

A metadata.php,

a php-file, which includes an if-function

a template-file, which opens my css-file, if the if-function is true

and a css-File which is including the picture


(and of course a folder with the pictue, that i want to include to the page)


I think, that i only have a problem with the php-File, that i want to write. I want, that the file is opening the template-file only, when i am is on the startpage. So i dont want to see the images, when i open the articles in an other view. This is my code:


PHP Code:

<?php
class startbuttons extends startbuttons_parent
{
    public function 
init(){
        if (
$this->Start.getArticleListStart.getArticleList( ) {
            
$this->_Start.getArticleList( )  = 'hi_start_bestsellers_upload_buttons.tpl';
        }
    }
}

The tpl-file only consists of one row that includes my css-File.

Viewing all articles
Browse latest Browse all 6951

Trending Articles