Topic Closed
juergen
1.4K Posts
51.3K Downloads
16 Plugins
design, web development & visual effects

Josh,
is there yet any chance to get a Section Combo (wrapper+several sub-sections) with default content defined in a plugin?

(edit:/ dirty tricks allowed - need it for a project)

Edited: 4 years ago#7735

Josh S.
2K Posts
266K Downloads
16 Themes
18 Plugins

Glad you asked. Yes, the most recent beta has a plugin hook to add/modify the section combos that are displayed to the user.

Line 173 of editing_page.php. This passes all of the links generated by gpEasy to the ManageSections filter hook in an array.

$links = gpPlugin::Filter('ManageSections',array($links));

If you want to add another link to the array within your plugin, you could use the NewSectionLink() method (See line 169 of the editing_page.php for an example)... though I'm noticing now that method will probably need to be changed to be a static method.

4 years ago#7736

juergen
1.4K Posts
51.3K Downloads
16 Plugins
design, web development & visual effects

Awesome!

Adding an image is a liitle tricky. I currently use...
  function ManageSections($links){
    global $addonFolderName;
    $links[] = editing_page::NewSectionLink(
      array('sectionType.sectionClass','sectionType.sectionClass','sectionType.sectionClass'),
      '/addons/' . $addonFolderName . '/section-combo-customImage.png' ,
      'myWrapperClass'
    );  
    return $links;
  }
… which works as long as the plugin is installed manually.
It won't work using $addonRelativeCode: ( $addonRelativeCode . '/section-combo-customImage.png' )
because NewSectionLink prefixes the image search path with $dataDir.
It could be filtered by looking for "/data/_addoncode/" in $addonRelativeCode but it's cumbersome.
4 years ago#7738

juergen
1.4K Posts
51.3K Downloads
16 Plugins
design, web development & visual effects

Yes! Yes! Yes!

This is sooo great! We can now build sophisticated multi-section elemens with specialized sections.

For example a row to present a product:
On the left an image section, at the center an editable text section and on the right a button section to link to a PDF or to an order page.
Each specialized section can have a default content and a special editor component (for example the button section's editor has only 2 fields for caption and link, the link with autocomplete for internal pages and a select button to link to files via finder).

Adding such section combos now is only 1 click for the Admin and editing cannot break the styling.
I'm really really happy and will soon provide a sample plugin that shows the power of this new feature.

Thanks Josh! It's a breakthrough in terms of functionality AND usability.

 

Edited: 4 years ago#7744

juergen
1.4K Posts
51.3K Downloads
16 Plugins
design, web development & visual effects

And here it is: ImageTextButton_0_1a.zip

For everyone interested in testing the addon:

  1. Make sure you have the latest beta 4.5b3 installed.
  2. If you have the "Responsive Image" addon installed, uninstall it first. "Responsive Image" is included in this addon.


Some screenshots:

Adding a new "ImageTextButton" Section Combo to the content:

Editing the Image Section Component:

Editing the Button Section Component:

 

 

Responsive Rendering:

 

Edited: 4 years ago#7770

feniweb
297 Posts

Wow, I have to accumulate what you all are programming there.
The whole thing is really close to my ideeal CMS for smaller websites.

I have the times tested.
As far as everything works. Except one, I can move your Wrapper_section in no other wrapper_section.

I have also created a new element. However, right in the editing_page.php so that you have to install a new module. There, however, I can not access the imgResponsiv. also I do not know yet how to integrate further Wrapper_sectionen.

Even the switch from Add to Organize and back does not always work.

tested under win7 chrome latest.

4 years ago#7774

juergen
1.4K Posts
51.3K Downloads
16 Plugins
design, web development & visual effects

Thanks for the rapid testing.

I can move your Wrapper_section in no other wrapper_section.

Works on Win7/Firefox 38.0.5. I haven't tested all browsers yet but if you cannot move the wrapper, it's likely a gpEasy issue. It's a normal wrapper section.
I'll have to test it tomorrow.

I have also created a new element. However, right in the editing_page.php so that you have to install a new module. There, however, I can not access the imgResponsiv.

The Responsive Image section is added via a plugin Hook/Filter so it seems logical to me that you will not have access to it directly in editing_page.php.
But it's not a good practice to define your own section/combo types in here. You colud try to add it after the plugin hook is called but I'd suggest to try coding it as a plugin. As long as you don't have special editor components, it should be relatively easy.

For dependencies between section types and section combos from different addons  - this will be hard to resolve. Up to now there is no dependency management for such things in gpEasy and - if we can sustain it - we shall just leave it at that. Unresolved dependencies because of missing/faulty components - this is the point where things can really become nasty.

also I do not know yet how to integrate further Wrapper_sectionen.

I fear, we currently cannot define Section Combos with multi-level wrappers.

Maybe Section Types and Section Combos can become more similar/unified objects somehow in the future. Currently they are different beasts but depend on each other. Hmm. Josh's turn.

The whole thing is really close to my ideeal CMS for smaller websites.

Yeah, I also really love the route it takes. Cutting-edge hot stuff!

 

Edited: 4 years ago#7776

Josh S.
2K Posts
266K Downloads
16 Themes
18 Plugins

Juergen,

Just a heads up, I've had to modify the plugin hook to make things work smoothly for the Manage Section area and the New Page dialog. I'll get you more details as soon as I have those pieces finished up.

4 years ago#7783

juergen
1.4K Posts
51.3K Downloads
16 Plugins
design, web development & visual effects

Thx. It would be great if section types and section combos could be handled in a more similar way internally.

I'd also love to have a way to create nested warpper combos, because here lies the true potential and key to sophisticated content structures. A few web editors/admins will possibily be able to drag togehter some basic sections inside a standard wrapper with a little advice but the really cool looking stuff will likely need nested wrapping with special classes - something only theme developers and plugin devs will be able to build.

I hope I don't ask for too much.

 

edit:/ BTW: Just launched www.lusre.de (built with gpEasy 4.4). Admins of websites with content structures like this one will greatly benefit from predefined section combos.

Edited: 4 years ago#7784

a2exfr
242 Posts
24.5K Downloads
2 Themes
10 Plugins

Hi Juergen.

I try to test ImageTextButton_0_1a.zip but no luck.

It work only  with 4.5 Beta 3 or with 4.5 Release Candidate 2 too?

 

4 years ago#7883

juergen
1.4K Posts
51.3K Downloads
16 Plugins
design, web development & visual effects

I try to test ImageTextButton_0_1a.zip but no luck.

Yes, the former "Manage Sections" hook changed to the slightly different "New Sections" hook.

Here is an updated version: ImageTextButton_0_3a.zip

Just a note: I'm not planning to release this as a regular plugin due to it's rather complicated and nested structure and it's conflicting with the already released Responsive Image plugin.
Maybe we I can find a better abstraction to link existing plugins into plugin based Section Combos like this one. We would need to have some kind of dependency Management, though ... hmm.

I Consider this plugin as a Proof-of-Concept to provide Section Combos in the context of more sophisticated themes.
 

Edited: 4 years ago#7885

a2exfr
242 Posts
24.5K Downloads
2 Themes
10 Plugins

Thanks.

I'm not planning to release this as a regular plugin due to it's rather complicated and nested structure and it's conflicting with the already released Responsive Image plugin.

Thats ok, I just wantes to understood how to create with plugin some page scructure with editable sections that user cannot break. 

It even can be kind a showcase of whole page.

4 years ago#7887

Topic Closed

 

News

Typesetter 5.1
8/12/2017

Typesetter 5.0.1 is now available for download. 5.1 includes bug fixes, UI/UX improvements, ... Read More

Over 8 Times Faster Than Wordpress
5/3/2016

We've known for a long time that Typesetter is fast. It's something we take pride ... Read More

More News

creisi productions

Dienstleistungen von creisi productions, Luzern (Schweiz): * Konzeption, Planung und Erstellung Ihres Internet-Auftritts * Betreuung und Aktualisierung/Pflege Ihrer Website * ...

Find out more about our Provider Spotlight

Log In

  Register