VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: JtouchMobile.com on December 03, 2011, 05:52:13 AM

Title: J173 + VM200RC3: Display template based on Joomla template?
Post by: JtouchMobile.com on December 03, 2011, 05:52:13 AM
Hi friends,

Is there any option from VM could helps our website display different layouts based on current selected template of Joomla?

For example:
- If I use 'bezz5', VM will use layout files from bezz5/html/com_virtuemart to present its layout
- But in some page or devices, let say iPhone, the whole page use 'jtouch' template, and there, VM will use layout files from jtouch/html/com_virtuemart instead of VM default files?

Thanks for any info
;)

Title: Re: J173 + VM200RC3: Display template based on Joomla template?
Post by: JtouchMobile.com on December 03, 2011, 10:45:49 AM
Got it, just live thing as "use joomla default" in template setting

But seem that the code of change template in each view file:

$template = VmConfig::get('vmtemplate','default');
if (is_dir(JPATH_THEMES.DS.$template)) {
$mainframe = JFactory::getApplication();
$mainframe->set('setTemplate', $template);
}


not work on J173?

Fine if:
if (is_dir(JPATH_THEMES.DS.$template)) {
$mainframe = &JFactory::getApplication();
$mainframe->setTemplate($template);
}