Open
Conversation
Member
|
Well, we had the same idea as I've implemented one to flex already. In there you can have an unlimited number of layouts for both collections and objects. It should already kind of work for the Flex Pages as well, just define the layouts and use the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I've been fiddling with the idea for a while now. In many cases, I need to have different representations of the same page. There are ways (namely headers) but those have limitations. They does not use the same pipeline as page content (so, no plugins).
Here comes what I called Alternative Representations. It's one or more other markdown files next to the usual one. Its use cases are:
Here's an super-simple illustration of the last use case. I need a two-columns page (or page module). Additionnally, I want to use the image-captions plugins. Here's what I get if I use a header:
Now, using the alternative representation:
Content pipeline (including plugins) processes the alternative MD file, caption is displayed.
My folder looks like this:

In my
left-columntemplate, I now use this:{{ page.alternativeRepresentation('side-content').content | raw }}As of now, implementation might have unexpected results in some cases (namely multi-language sites) and I may need some guidance there.