Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
QUESTION Why are components under 'Theme' tab
#1
If I understand correctly, switching themes doesn't switch to a different set of components.

I do feel that this is correct behavior, but it shouldn't be listed under the theme tab.

There may be a place for theme-specific components, though,
just like there is a place for site-specific css and js, as opposed to theme-specific js.

It would be **extremely** useful for beginning getsimple addicts (that includes me) to have documentation on
- the recommended place for site specific css and js (now I put these under data/uploads/..., is this a sensible choice?)
- the recommended place for theme specific css and js (this I suspect, is under the theme/mytheme/ subdir)
- recommended component names that ought to be supported by Themes (available thru extend or otherwise): e.g., sidebar, tagline,... This should help theme authors to arrive at themes that mostly continue to work after switching from one theme to another.

Even though, apparently, having <script> and <style> tags in html that has been pasted into page source seems to work (not sure about php), the Wysiwyg editor can't be trusted not to re-edit the html, and, certainly, if it finds html syntax errors or *worse* unsupported features, it will destroy all or part of it. I understand that getsimple pages are not the preferred place to put script/css.

Incidentally, the ckeditor does not seem to support all of the attributes that are sometimes found in html tags (e.g., input tags), so editing such tags with the contextual popup may destroy some of the attributes.

I am also asking myself:
- how to add special characters in unicode/UTF-8. I tried to enter the search symbol (left-pointing magnifying glass), just by pasting the character itself, or by pasting it as an &<hexCode>; html entity, but no cigar.
Reply
#2
Theme is just theming, be dumb to have 1 thing inside it, besides it has editors in it so they are all together. Not sure what else to call the tab, style, visual, presentation.

I have asked for theme input, never got any responses for default components and snippets.

I you find stuff not supported or stripped from tags post them, maybe there is ckeditor config to modify this, ckeditor is its own massive library.

Not sure about utf-8, I think there is a charmap kind of insert plugin, it might even be included in the full toolbar.
if not maybe there are options in ckeditor that are causing issues with utf-8 we can look into . let me know
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#3
Hi Shawn, thanks for your quick response.

components>it is just that components are similar to pages in that they belong to the site, not the theme. Having them under the theme tab may appear to some like they are switched out if one switches themes.
However, you are right. When I wrote the comment, I thought that the theme selection dropdown menu remained visible all the time in the theme, but this isn't the case. Maybe the tab name "Theme" could be refined, but nothing more. Sorry.

tags>If I run into issues with the popup, I'll experiment and try to concoct minimal examples to post here. So far I have avoided editing in wysiwyg mode in the neighborhood of tags with essential attributes.
Reply
#4
(2016-11-24, 01:27:19)vanfruniken Wrote: components>it is just that components are similar to pages in that they belong to the site, not the theme. Having them under the theme tab may appear to some like they are switched out if one switches themes.
However, you are right. When I wrote the comment, I thought that the theme selection dropdown menu remained visible all the time in the theme, but this isn't the case. Maybe the tab name "Theme" could be refined, but nothing more. Sorry.

Component code you place inside of the theme. If you switch theme this code is not automatically in your new theme. If you use dynpages plugin you can place components in your pages, but this is not default behaviour.
http://get-simple.info/wiki/components
Reply
#5
(2016-11-30, 20:23:05)datiswous Wrote: Component code you place inside of the theme. If you switch theme this code is not automatically in your new theme. If you use dynpages plugin you can place components in your pages, but this is not default behaviour.
http://get-simple.info/wiki/components

I haven't observed components to be theme-specific, but then again I use dynpages. I'll try to verify your claim by deactivating the dynpages plugin and see how that affects the visibility of components across themes.

But anyway, I feel in an ideal world, there is a place for both approaches
- a site could conceivably contain components, php, javascript, even a few styles, that aren't part of any theme, but are site-wide (having to do with content, e.g., the logic of a form is not presentation and should not be theme dependent);
- each theme could conceivably contain its own components, php, javascript, and certainly many styles (having to do with presentation)

It would be interesting to know where the javascript and styles should optimally be placed for the site-wide, i.e., theme-independent, page content dependent stuff. 
In particular, adding to <head> would need the GetSimple engine to automatically include something (e.g., a standard component) that the content designer can provide.

Maybe if I weren't such a newbie in GetSimple land, I would know the answers, so please excuse my frivolous questions.
Reply
#6
There is no such concept as theme specific styles or js, these would be things you code inside the theme.
That is why there is a theme editor built in.

There is no such concept of site wide styles or js

There is also no concept of advanced theme components. Although this is on a wish list for future, but no specifics have been discussed or engineered.

For site wide injection of these things, we use plugins or dynpages plugin to load components.
For advanced asset or code injection WITHOUT writing a plugin, use my "hook components" plugin.

Which basically lets you map components to plugin hooks
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#7
Thank you so much for your quick and very enlightening clarification.
Reply
#8
There might even be a plugin or two to do header injection etc.
Not sure though, custom header or something perhaps
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#9
(2016-12-02, 02:38:15)shawn_a Wrote: ...

For site wide injection of these things, we use plugins or dynpages plugin to load components.
For advanced asset or code injection WITHOUT writing a plugin, use my "hook components" plugin.

Which basically lets you map components to plugin hooks

Thanks, shawn_a for pointing out the capabilities of your hook components plugin. It rocks! (in particular the hook_theme-header, which, contrary to what its name might suggest, is NOT theme-specific).
In conjunction with dynpages, I am now able to include site specific business logic into my site, which is robust w.r.t. theme switching.
Reply
#10
good, a global theme might be an interesting option, to use that hook to load a global theme before the custom theme loads. A plugin could easily do that, but getting the 2 to work togather without theme hooks is a bit hard, we only have the several front end hooks to work with. interesting case though.
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply




Users browsing this thread: 1 Guest(s)