Allow for more complex Repeater PageViews #100
Labels
Feature: Request
The feature does not exist and this is a formal request for it to be added
RFC
We need feedback on a topic
Milestone
This is a proposal for extending the Repeater PageView behavior to allow for more complex nesting of permalinks. This feature would also be the foundation for supporting pagination at stakx's core.
Summary
The following Front Matter would generate the following permalinks:
/projects/bzflag/
/projects/bzflag/plug-ins/
/projects/bzflag/projects/
/projects/jekyll/projects/
/projects/jekyll/themes/
/projects/libraries/
/projects/stakx/
/projects/web-design/
Twig Usage
In each instance of the Repeater PageView,
this.iterators
would take on the following values:this.iterators
=[ proj => 'bzflag', category => null ];
this.iterators
=[ proj => 'bzflag', category => 'maps' ];
this.iterators
=[ proj => 'bzflag', category => 'plug-ins' ];
this.iterators
=[ proj => 'jekyll', category => 'projects' ];
this.iterators
=[ proj => 'jekyll', category => 'themes' ];
this.iterators
=[ proj => 'libraries' ];
this.iterators
=[ proj => 'stakx' ];
this.iterators
=[ proj => 'web-design' ];
Detailed Description
At the moment, value expansion only works with an array of strings. This behavior would allow for value expansion to work with associative arrays that allow for further scoped value expansion. When value expansion reaches the "bzflag" value, it will take the value
proj
and build the permalink off of that.At this point, we'll have the permalink of
/projects/bzflag/%category
and because of the scoping, it will then proceed to expand the values of this permalink with the values ofprojects[0].bzflag.category
and generate three permalinks./projects/bzflag/
/projects/bzflag/plug-ins/
/projects/bzflag/projects/
Pagination
So how would this specification work with pagination (#72)? Essentially, this would allow for stakx pagination to live at stakx's core with built-in features. Given a blog website, the arbitrary
_
has no significant meaning in- _:
and is just a way to trigger this special behavior of requiring an associative array versus a string.These examples are what the FrontMatter would look like internally, the syntax for pagination would be that of #72.
and given a "group by category" clause, the FrontMatter would look like this:
The text was updated successfully, but these errors were encountered: