Overriding /settings/templates

Hello,

Is there any way to override the template files located in owncloud/settings/templates/... in a similar way to how theme files can be overridden in owncloud/custom/...? It’s not practical for me to edit the source files located in owncloud/settings/templates directly.

Thanks

1 Like

Hello,

how about opening an issue on Github ? AFAIK, this kind of issue has more chance to get any answer there.

1 Like

When you create a theme - see https://doc.owncloud.com/server/developer_manual/core/theming.html - it IS possible to overrride those templates.

2 Likes

Hi Cortho,

Unless I’m not understanding the docs correctly I cannot override / extend the templates located in the settings directory (eg owncloud/settings/templates/tokensendnotify.php) in the same way that I can override template files located in the owncloud/core/templates directory using a owncloud/custom directory.

Ideally it would be to have:

owncloud/
   core/
      ....
   custom/
        core/templates
        js/
        css/
        settings/templates <----- my overrides
    settings/
    .......

as opposed to:

   core/
      ....
   custom/
        core/templates
        js/
        css/
    settings/
        templates/ <--- my overrides
    .......

Hi baggsie,

I do not think you can override the templates the way you mentioned.
You would have to create a theme app - there is a simple example at https://github.com/owncloud/theme-example (direct link to the zip: https://github.com/owncloud/theme-example/archive/master.zip )

There you can add the folders /settings/templates with the templates you want to override.

When you want to rename the theme, rename the folder and the id value in /appinfo/info.xml
(recommendation: only use theme-yourname w/o any other special characters as id/name.

Along with the documentation linked above you should have your theme working soon

3 Likes

OK, I’ll give it a go.

Thanks for your help Cortho.

1 Like