Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+3 votes
in Q2A Core by
I'm developing a different look and feel for Q2A, changing a lot of the css/js front end aspects and varying plugins and adding new ones.

It seems everything can be done with the various plugins - including the layer ones for any front end changes. Do themes need to be utilised or can they be ignored? Am I missing something by just using plugins? Any thoughts would be welcome.
Q2A version: 1.7.4

1 Answer

+2 votes
selected by
Best answer

It's a interesting discussion. I think also theme is not necessary.

Theme is same with layer plugin. The only difference is that style sheet (qa-styles.css) is essential in theme. Theme without style sheet becomes error. However, this is just one rule of the core. In other words, we can substitute theme with layer plugin.

View (HTML markup) of the MVC model is processed by qa-include/qa-theme-base.php. Blank theme below outputs no-designed page (pure HTML). This is a valid HTML page.

  • Create qa-theme/Blank folder
  • Create empty qa-style.css under qa-theme/Blank folder
And, when we want to change fundamental design, we need to change HTML markup. We can do that with current theme system, but overriding many functions in extended classe will degrade performance. This is one limitation of the Q2A theme system.
Makes a lot of sense.
It also seems a little cumbersome to have to maintain the theme folders and the plugin folders especially where everything can be pretty much done in the plugin folders.
Yeah, I think so too. But, in the MVC model concept, it is important to make the view independent of other processing. So Gideon did so.

By the way, this is one core hack for realizing drastic design. This is effective to realize innovative design beyond the existing themes. Look at "Site theme base" option.
@sama55 That page is incorrect. Overriding every function from a base theme does NOT decrease performance. Because in that case, nothing in the base theme is ever executed.

If you were overriding every function and still calling through to the base theme in every one, there may be some overhead but it's completely negligible. (And this would not really make sense anyway, because what would you be changing in every function if you just go back to the base theme every time.)
@Scott In order to maintain compatibility with layer plugins, it is necessary to call functions of the base theme. Do you have the experience of creating a theme that overrides most functions of the base theme? I have that experience at the first version of FlexArmor1 theme. For example, at creating a Bootstrap theme, think about changing HTML classes entirely without using mixins. You should show real experience and verification results, not your imagination.
@sama55 Since you are the one making the claim, perhaps you can provide proof to me. Do you have a link to your theme so that I can test?

Yes it is encouraged to call the base theme with layer plugins, but layer plugins don't override every function.

If you're making a theme that changes all the HTML, then in most cases you won't be calling the base theme (because it would duplicate the HTML you just output).