Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Components for theme
#15
It should be possible to write a plugin that has the same (or a similar enough) interface for editing components, but with an additional section for the template-specific ones (and redirect from the original components editor like I18N does for the normal pages list).

As for the default value discussion: how is it meant to work? Is it meant to be a default set of data that is copied over the first time for the user (and which remain unchanged in the theme directory), or just be the initial set of components?

I still think it is slightly strange to save theme components in the data directory given what is accessible for the theme developer already. It turns what could be PHP scripts (which are organised in a suitable place) into data formats that have to be parsed and eval'd. For global components this makes sense since there is nowhere for the user to reasonably organise these scripts. Again, I could be deeply wrong here, but something about it seems off.

As for namespacing, we could go for a slash prefix on globals, like get_theme_component('/component-name') for a global component and get_theme_component('component-name') for the template-specific one.
Reply


Messages In This Thread
Components for theme - by Oleg06 - 2016-03-07, 00:40:39
RE: Components for theme - by shawn_a - 2016-03-07, 03:33:37
RE: Components for theme - by shawn_a - 2016-03-07, 03:40:17
RE: Components for theme - by Oleg06 - 2016-03-07, 04:09:17
RE: Components for theme - by shawn_a - 2016-03-07, 05:40:15
RE: Components for theme - by Oleg06 - 2016-03-07, 06:41:16
RE: Components for theme - by datiswous - 2016-03-07, 23:50:27
RE: Components for theme - by shawn_a - 2016-03-08, 23:07:22
RE: Components for theme - by datiswous - 2016-03-09, 03:16:31
RE: Components for theme - by shawn_a - 2016-03-11, 13:03:01
RE: Components for theme - by lokothodida - 2016-03-26, 21:49:11
RE: Components for theme - by DimaYakovlev - 2016-03-26, 23:48:54
RE: Components for theme - by Oleg06 - 2016-03-26, 23:01:13
RE: Components for theme - by shawn_a - 2016-03-27, 01:52:12
RE: Components for theme - by lokothodida - 2016-03-27, 10:32:49
RE: Components for theme - by shawn_a - 2016-03-27, 10:57:48
RE: Components for theme - by shawn_a - 2016-03-27, 11:04:02
RE: Components for theme - by lokothodida - 2016-03-27, 19:48:07
RE: Components for theme - by shawn_a - 2016-03-28, 00:04:23



Users browsing this thread: 1 Guest(s)