i am trying to allow users to select a theme in their user profile, which according to the backdrop guide is possible (as it is in drupal).
from the guide (https://backdropcms.org/guide/themes)
" Enabled alone will allow users to select the theme if you have allowed that permission."
i cannot find any such permission on the permissions page (https://site/admin/config/people/permissions). am i missing something?
the underlying issue (which the above feature would work around for me) is that i have created a custom theme, and i have overridden the page.tpl.php file by copying it from the system module to my theme directory. now, when i am not logged in, and i attempt to log in by going to https://site/user, the request is routed through that page.tpl.php, and my theme is served up, resulting in a broken page.
i know this is not the way backdrop is designed, but right now i am not using layouts at all. i could not quickly figure out how themes and layouts play together to get my site design to work quickly (i am on a time-crunch project, migrating a site from wordpress). i assume that is part of the problem, but i cannot figure out why.
thoughts? other than just tearing me a new one for not using layouts, which i know is deserved.
Comments
Hi @laz,
Backdrop core does not support the ability for users to select a different theme as Drupal did, but contributed modules may provide this feature. I've updated the text in the user guide to make it more clear what core supports, and what has been left to contrib: https://backdropcms.org/guide/themes
Backdrop's "layouts" replace the file that used to be named
page.tpl.php
in Drupal 7. (Thepage.tpl.php
file in Backdrop is the same as the one namedhtml.tpl.php
in Drupal 7).Just as a Drupal 7 theme defined regions, and they were output in the page template for that theme, a Backdrop Layout will define its regions, and those regions are output in the layout--name.tpl.php template.
The main difference is that now your block placements are no longer dependant on your theme. Additionally, any theme can now override the layout templates!
I would guess that the problems you are having with the log-in page are coming from the code that you've placed in your
page.tpl.php
file. As you've noticed - that file is used on every page of your site, so tread softly in there. Here's an example of what the page template might look like for a Backdrop site: https://github.com/backdrop-ops/backdropcms.org/blob/master/www/themes/b...thanks much for the response. with help i get ever closer to comprehension. :-)
You cannot allow users to choose different themes, but as a developer you can use, create and configure different layouts that are active for particular users and thus modify the design of the site for these users.
This is also possible for individual blocks.
This is done by visibility conditions for layout or block.
Visibility conditions are as follows: