Let /local theme files override core theme files

Bug #1328310 reported by Aaron Wells
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Fix Released
Wishlist
Aaron Wells

Bug Description

When I discovered that you can put template files under /local/theme/templates, I assumed that they would act like lang files placed under /local, and override any other theme files.

But it turns out that, no, they come further down in the include list than the theme directories, which means their only use is if you're creating entirely new content.

I think that the ability to use /local to override an individual theme file would be quite useful, though.

Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "master" branch: https://reviews.mahara.org/3423

Revision history for this message
Mahara Bot (dev-mahara) wrote :

Patch for "master" branch: https://reviews.mahara.org/3424

Revision history for this message
Aaron Wells (u-aaronw) wrote :

The logical next step in this would be to let you have /local/theme overrides for specific themes.

/local/theme/primary/...
/local/theme/raw/...

This especially makes sense if you're using it to override graphics, as you'd want some versions for dark themes and others for light themes.

But, I'll way and see if someone in the community actually requests that, before we complicate things further.

Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/3423
Committed: http://gitorious.org/mahara/mahara/commit/f436389fd2781eaf733ac6ac15b2293bd15e80fc
Submitter: Yuliya Bozhko (<email address hidden>)
Branch: master

commit f436389fd2781eaf733ac6ac15b2293bd15e80fc
Author: Aaron Wells <email address hidden>
Date: Tue Jun 10 11:36:11 2014 +1200

Let local templates override core templates

Bug 1328310

Change-Id: I06dd8986da6388a6b7f2033270f503aeaab044dd

Aaron Wells (u-aaronw)
Changed in mahara:
status: New → Fix Committed
status: Fix Committed → In Progress
assignee: nobody → Aaron Wells (u-aaronw)
Revision history for this message
Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/3424
Committed: http://gitorious.org/mahara/mahara/commit/8eaa0c4a6b73e8abee5b32e730221c42b52a8cb9
Submitter: Yuliya Bozhko (<email address hidden>)
Branch: master

commit 8eaa0c4a6b73e8abee5b32e730221c42b52a8cb9
Author: Aaron Wells <email address hidden>
Date: Tue Jun 10 11:46:17 2014 +1200

Allow /local to override static files as well

Bug 1328310

Change-Id: I51f069bc09eb83227154da970462c661bada8684

Revision history for this message
Aaron Wells (u-aaronw) wrote :

Just some clarification for posterity.

There are two patches on this bug. The first one does specifically what the bug header describes. It makes sure that the /local templates come before any of the theme templates in the include list. There is a catch to this, though. It turns out that /local was not actually last. It was just below the current theme. So the include path was:

- current theme
- /local
- parent theme(s)

This patch changes it to the more logical:

- /local
- current theme
- parent theme

The second patch is a slight departure from the wording of this bug. It allows for a /local/theme/static directory, which can provide and override static assets (i.e. images and CSS files).

Aaron Wells (u-aaronw)
Changed in mahara:
status: In Progress → Fix Committed
tags: added: nominatedfeature
Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "master" branch: https://reviews.mahara.org/3797

Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/3797
Committed: http://gitorious.org/mahara/mahara/commit/20da6bf875a422c992798e0844f4d5807c3015cb
Submitter: Robert Lyon (<email address hidden>)
Branch: master

commit 20da6bf875a422c992798e0844f4d5807c3015cb
Author: Aaron Wells <email address hidden>
Date: Tue Oct 14 11:58:04 2014 +1300

Removing the redundant new local function for style overrides

Bug 1346926: This bug replicates the functionality of the
newly enhanced (in bug 1328310) local/theme directory. I'm
updating the documentation of local/theme at the same time,
to try to avoid this kind of replication in future.

Change-Id: Ia36442ac264f5e0740278592e734ddc0838bb80f

Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "1.10_STABLE" branch: https://reviews.mahara.org/3806

Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/3806
Committed: http://gitorious.org/mahara/mahara/commit/ed34abc79d92f77f19745f29570b3b720f53c862
Submitter: Robert Lyon (<email address hidden>)
Branch: 1.10_STABLE

commit ed34abc79d92f77f19745f29570b3b720f53c862
Author: Aaron Wells <email address hidden>
Date: Tue Oct 14 11:58:04 2014 +1300

Removing the redundant new local function for style overrides

Bug 1346926: This bug replicates the functionality of the
newly enhanced (in bug 1328310) local/theme directory. I'm
updating the documentation of local/theme at the same time,
to try to avoid this kind of replication in future.

Change-Id: Ia36442ac264f5e0740278592e734ddc0838bb80f

Aaron Wells (u-aaronw)
Changed in mahara:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.