Nested Template Inheritance



  • Currently any theme has one baseTheme
    If the template doesn't exist in the main theme in looks in its baseTheme.
    It would be nice if that depth was recursive so if it wasn't in the baseTheme and the baseTheme had a baseTheme that it could look there too.

    Currently if you want to maintain a Lavender based theme with only one line change you have to fork all of lavender and constantly merge in its changes.



  • @drew this idea wouldn't work if > 1 line change but why don't you forget about maintaining a fork and just change the Lavender core on each upgrade? I know you'll lose the change each upgrade but it might be an easier approach than what you're currently having to do.

    That said, I know it's not a very clean way of working.



  • @henrywright even if 2 or 3 template files are altered in the main template then there's still scope for this to be worthwhile.
    When I said "constantly merge in changes" I meant every time I upgrade, which with the current NodeBB release schedule is quite frequently.



  • @henrywright said:

    this idea wouldn't work if > 1 line change

    I was referring to my idea of making a manual 1-line change to the theme core at the point of each upgrade. That would avoid you having to use Git to merge in new commits each upgrade.

    Again, although not a clean way of working, it sounds like it'll be easier than what you're currently doing.


Log in to reply
 


Looks like your connection to NodeBB was lost, please wait while we try to reconnect.