- Posts: 2696
- Thank you received: 74
afficher image ordering 1 show_block_img.php
13 years 10 months ago #75176
by erickb
afficher image ordering 1 show_block_img.php was created by erickb
Je ne veux afficher dans le detail que la grande image ordering = 1
dans templates/TPL/html/com_hikashop/product/show_block_img.php
est ce la seule methode ?
il n'y a pas plus simple ?
un truc du genre $this->element->images[1]
dans templates/TPL/html/com_hikashop/product/show_block_img.php
Code:
$image = reset($this->element->images);
$photo = '';
foreach($this->element->images as $num => $image){
if ($num==1){
$photo = '<img src="' . $this->image->uploadFolder_url . $image->file_path . '" alt="' . $image->file_name . '" id="hikashop_main_image" />';
}
}
echo $photo;
est ce la seule methode ?
il n'y a pas plus simple ?
un truc du genre $this->element->images[1]
Please Log in or Create an account to join the conversation.
13 years 10 months ago #75293
by Xavier
Replied by Xavier on topic Re: afficher image ordering 1 show_block_img.php
Bonjour,
Vous pouvez tout à fait utiliser ceci:
à la place du foreach.
Vous pouvez tout à fait utiliser ceci:
Code:
echo $this->image->display($this->element->images[0]->file_path, 'hikashop_main_image'.$variant_name, $this->element->images[0]->file_name, 'class="hikashop_child_image"','', $width, $height);
Please Log in or Create an account to join the conversation.
13 years 10 months ago #75295
by erickb
Replied by erickb on topic Re: afficher image ordering 1 show_block_img.php
ha voilà c'est beaucoup mieux
merci
merci
Please Log in or Create an account to join the conversation.
Time to create page: 0.162 seconds