WebsiteBaker Support (2.8.x) > Bakery Shop
Different template for view item
daydreamer:
Is it possible to set a different template for the view_item.php to make it different from the template in the page settings?
Ruud:
No, the view.php (loading view_item.php) is actually loaded by the already loaded template.
The bakery item detail page has a special defined variable (ITEM_ID)
You can manipulate your template simply by using something like:
--- Code: (untested) ---<?php
if ( defined('ITEM_ID')) {
include ('index2.php');
return;
}
--- End code ---
Just put this in top of your template index.php.
This way bakery detail pages will use index2.php as template.
daydreamer:
Thanks Rudd,
How would I call the item title in the index2.php?
Ruud:
Just treat index2.php the same as any other templates/..../index.php
Basically it is a second template in the same template directory.
You could use the Simple pagehead snippet to use the correct titles.
http://www.bakery-shop.ch/#simplepagehead
daydreamer:
Thanks, I mean show the item title in my index2.php template
Navigation
[0] Message Index
[#] Next page
Go to full version