Search

After a suggestion in the Intra-section-multipliers in 2.0? thread I've created a rough proof of concept for the "inline sections" idea.

The idea is to replicate the Wordpress-esque functionality whereby an inline Images section appears directly under a blog Post. To use the field, install the extension and do the following:

Create a section "Posts", and include the Inline Section field as follows:

Figure 1

Then create the "Images" section (the "images" value above) adding a Section Link (named "Post", the "post" value above) back to the Posts section. The end result is a Post entry page that looks like:

Creating a new post

Figure 1

Editing an existing post

Figure 1

The field works by creating an iframe and using the field values to create the URL. A JavaScript file is written to every backend page, checking for an ?inline-section on the end of the URL, which is applied to all pages loaded into the iframe. The JS provides a hook to allow CSS to manipulate the page styling slightly, removing the hader/footer and tightening some margins.

Granted, I can't see this being particularly useful in many instances outside of this scenario. Indeed, for a true image brower, a front-end page pulling a data source from a linked Images section would be more appropriate. But this field prototype is generic enough to be used for anything.

Would love some feedback and ideas of how this could be elaborated upon.

Attachments

Just to add — this is entirely a proof of concept and not a finished extension. There are major bugs in the JavaScript and CSS, but I simply wanted to see whether this concept would be useful.

Anything to help manage images and insert them into text editors -- while in the entry edit screen -- would be very useful.

This would be easily achievable using some JS attached to the images. However this would obviously tie this functionality down to images only, where in reality, it can be applied to any section link scenario.

If it's a specific image browser, it may even be worth writing a separate file manager extension (either as an Extension in the backend, or as front-end XSLT pages) and link this into the backend via the iframe.

I'm still not sure whether I like the iframe idea. It solves a problem, but it isn't an elegant solution.

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details