Phoenix's templating system is very powerful but can be confusing at first glance. In this post I'll try to shine a light on how templates interact with each other, I'll try my best to keep it simple.
PREAMBLE
Core Phoenix ships "out of the box" with TWO templates;
default
and
override
The override template is selected as the used template in a new installation of Phoenix.
The override template EXTENDS the default template.
This means that you can copy files from default into override, then make changes to the files in override to suit your needs. You can read more about this here; https://phoenixcart.org/phoenixcartwiki ... a_Template
Therefore from a new install, you would be set up to use the override template.
You could of course use the default template if you so wished, simply by selecting the option in Admin, though this is absolutely not recommended.
USING A COMPLETELY DIFFERENT TEMPLATE
There are a few Phoenix templates floating about, ready for use, at least 4 or 5 if memory serves. Let's make one up, just for this post and call it "xmas" - this "xmas" template EXTENDS the default template and you've selected it as the used template in Admin. What does this mean in real life?
1. xmas has NO CONNECTION to override, override is now not being used at all in your site.
2. Any instructions you find on this forum or site, or from a 3rd party [eg a developers module/hook], that refers to override, exchange the word override for xmas. EG, the instructions here mention override a lot, just remember that each time override is mentioned, you should think/use "xmas".
Hopefully this shines a light into templating Phoenix a bit, but if anyone has any questions please ask in this thread - remember that others most likely have the same question so no question should be out of bounds. We're here to help as best we can.
Templates: default - override - another - etc
- burt
- Core Team
- Posts: 4561
- Joined: Tue Oct 29, 2019 9:37 am
- Phoenix Version: v1.1.0.8
- : Buy Me A Beverage
- Has thanked: 252 times
- Been thanked: 413 times
Templates: default - override - another - etc
I am not here to build for you.
I am here to build with you. Let's help each other.
I am here to build with you. Let's help each other.
-
azpro
- Contributor
- Posts: 177
- Joined: Fri Nov 06, 2020 8:25 am
- Phoenix Version: v1.1.0.6
- Has thanked: 30 times
- Been thanked: 34 times
Re: Templates: default - override - another - etc
Is there a (easy) way of using different template for admin?
Have been looking at the code but there seems to be some mixing admin/catalogue files.
Thanks!
Have been looking at the code but there seems to be some mixing admin/catalogue files.
Thanks!
- burt
- Core Team
- Posts: 4561
- Joined: Tue Oct 29, 2019 9:37 am
- Phoenix Version: v1.1.0.8
- : Buy Me A Beverage
- Has thanked: 252 times
- Been thanked: 413 times
Re: Templates: default - override - another - etc
Admin is not templatable.
It probably never will be.
It probably never will be.
I am not here to build for you.
I am here to build with you. Let's help each other.
I am here to build with you. Let's help each other.