[solved] template override troubles: picking the right Default or override it

Started by k0nan, November 17, 2010, 12:48:23 PM

Previous topic - Next topic

k0nan

i'm using joomla ja_purity as default template.
i've assigned to every virtuemart view the ja_purity template.

i'm trying to override the "virtuemart" view - aka frontpage - so i put in my folder
templates\ja_purity\html\com_virtuemart\virtuemart
the files here contained
components\com_virtuemart\views\virtuemart\tmpl
as we usually do to use template override.

when i modify default.php, no changes take effect in the page display.


can you confirm this ?

The Official VirtueMart 1.1 User Manual  is out, get a copy now!

Stai cercando aiuto per VirtueMart in Italiano ? Visita VM Italia

PRO

konan, I am not aware you can overide vmart templates with template overides.

BUT: what you can do it copy the theme folder, and rename it. THEN, vmart has its own templates you can change.


Milbo

BanquetTables, you are talking about vm1.1.x series. In vm1.5 has no theme directory any longer.

VM1.5 can do that exactly, but k0nan seems to went a different way than I expected.
Quote from: k0nan on November 17, 2010, 12:48:23 PM
i'm using joomla ja_purity as default template.
i've assigned to every virtuemart view the ja_purity template.
I fear there is the problem. You assigned every view with joomla to use the ja_purity template. But this wont help people, because they want different templates/layouts by category id or product id.

To be sure, you use it the intended way do the following. Remove all configuration within joomla for the templates. Just choose a standard for your joomla page. Now you should see the page and joomla in the choosen standard template.

When you enter now the virtuemart configuration, you can set a standard template for all com_virtuemart things. Not per view, just for the whole component. To extend this, you can then choose a different standard template for categories and products.
When you save now, then you should be able to see the extra layouts in the selector, of course you need an extra file placed like you described.  When you do not see the extra layouts, something is wrong.
The selector shows the default layouts of the view and adds the extra layouts saved in the template.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

k0nan

let me say that this can be confusing at first place: i mean, if we use override, why i can't override the default ? :P :D
in fact, joomla usually allows to override everything including the default of course, so i try to apply the same concept to vm1.5

so, in order to recap

overrides works
but
in a different way than standard joomla
as the default template for the specific view can't be edited
but other templates for that specific view can be added
so it is pointless to have a default.php file in template directory

right?
The Official VirtueMart 1.1 User Manual  is out, get a copy now!

Stai cercando aiuto per VirtueMart in Italiano ? Visita VM Italia

Milbo

it is not pointless. The default.php of the choosen template is used not the one in the FE/view/tpl directory.

I think it is important to consider what the most people need first.

I think they are happy that they can just choose a joomla template and it works.

Next level is that the people have their own template for their shop and maybe different from the normal joomla page and want to change the layout (flypage).

Next level is that the people want to have different templates for different categories.

They dont want to have japurity for categories and beez for productdetails. This makes not really sense. They want a winter theme for winter category and a spring theme for spring category and the products should have the same themeof course.

So I think it is right to ignore the template used for the views and to override it so as a shop needs it.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

k0nan

#5
Quote from: Milbo on November 18, 2010, 00:00:19 AM
it is not pointless. The default.php of the choosen template is used not the one in the FE/view/tpl directory.


well, i've put the default.php in the choosen template folder and i've edited it, but no change is shown in the frontend!
that's what i reported in the first post
i resaved the configuration, sure, like you suggested before

could anyone please confirm this behaviour ?
The Official VirtueMart 1.1 User Manual  is out, get a copy now!

Stai cercando aiuto per VirtueMart in Italiano ? Visita VM Italia

k0nan

#6
ok

it's working

i find out that simply there are two "Default" item listed in the dropdown menu, so it's difficult to say which is the one from the component folder and which is the one from the template folder at first sight :)

may we have to insert something to make it more clear ?
The Official VirtueMart 1.1 User Manual  is out, get a copy now!

Stai cercando aiuto per VirtueMart in Italiano ? Visita VM Italia

Milbo

Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Milbo

Quote from: k0nan on November 18, 2010, 00:57:17 AM
i find out that simply there are two "Default" item listed in the dropdown menu,

I removed that it is listed twice. The joomla mechanism automatically tries to get the choosen layout from the template and if none is there it takes it from the component folder.

I changed now the function so that it is only shown one time.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/