Skip to content
This repository has been archived by the owner on Jan 13, 2021. It is now read-only.

Feature request: Repeating content fields #94

Closed
martonlente opened this issue Nov 11, 2018 · 6 comments
Closed

Feature request: Repeating content fields #94

martonlente opened this issue Nov 11, 2018 · 6 comments

Comments

@martonlente
Copy link

martonlente commented Nov 11, 2018

Hello,

I've started using Vapid, and I'm truly amazed by its ease of use and flexibility. However, there is one feature I really miss, that may add even more flexibility without adding too much complexity to the system.

You can now add all kinds of repeating content by using sections, with multiple attribute set to true. This can also be used to create a blog-like, or 'list/detail' page functionality. However, there is currently no way to add repeating content within individual 'blog items' or 'detail pages'. To better describe – let's say, I'd like to create a blog, where blog posts may have an image gallery, with varying number of images. As a workaround I could set up multiple image-type content fields, and simply use only as many as I need to upload images when managing content. However, it'd be much more elegant, to simply enabling repeating content within sections, maybe by adding an attribute or so.

To illustrate this, I may reference Perch CMS, that has 'Repeaters tags' – sorry for the comparision, but that's good example, to get the idea. This could be used to repeat list items, images, etc. A similar functionality would be very welcome to Vapid too, and open up a lot of possibilities!

Kind regards,
Márton Lente

@walidvb
Copy link

walidvb commented Nov 11, 2018

dupe of #6 , whose thread moved to #57. Feel free to participate there, so we can move all this forward! :)

@martonlente
Copy link
Author

martonlente commented Nov 12, 2018

Thanks for pointing me to those threads! After reading them through though I'm not sure they're exactly what I mean:

  • 'Repeating content fields' (as I call them) shouldn't be limited to images, and not even a tag. In my opinion they should work exactly like sections with multiple attribute set to true, by being able to repeat blocks of code, but without the presence on the dashboard's sidebar.
  • I suggest this feature shouldn't be a 'custom directive', but part of Vapid core – if possible. By adding this feature, Vapid'd be able to manage completely bespoke blogs and list/detail pages, with the small 'price' of having eight content types instead of seven. Whether you used it for images, list items or blocks of code, should be up to you!

I'd rather keep this thread open being more focused, but will keep an eye on the others too!

Kind regards,
Márton Lente

@walidvb
Copy link

walidvb commented Nov 12, 2018

Agree on the 'core' part. I think @srobbin was weary of adding this already, as it might impact the architecture of the way input is handled.

Not sure what you mean by 8 content types instead of seven? as far as i understand, each content type would need to be storable as unique value or array, no?

@martonlente
Copy link
Author

martonlente commented Nov 12, 2018

Thanks @walidvb for your answer. Regarding the 'eighth content type' I wrote, I meant it could be implemented as a new content type. Maybe I was wrong, as its syntax could be more similar to sections'.

What I mean could work (or look) like this in code:

{{#section about}}
<div>
  <h2>{{title}}</h2>
  <ul>
    {{#repeat}}
      <li>
        <h5>{{school}}</h5>
        {{city}}, {{state}}
      </li>
    {{/repeat}}
  </ul>
</div>
{{/section}}

I think the above would be very familiar to Vapids' logic, and wouldn't overshadow its simplicity. A repeater shouldn't even have a name necessarily. Or it could be implemented by using a section, without naming it, but adding multiple attribute set to true.

I'm also aware of the suggestion regarding nested sections, which I also find useful, but definitely see as a different feature, not a 'replacement' to this.

Kind regards,
Márton Lente

@srobbin
Copy link
Contributor

srobbin commented Nov 15, 2018

@martonlente Thanks for the suggestion. I think this close enough to being a Duplicate of #6 that I'd like to consolidate the conversations, but we'll definitely take your #repeat idea into consideration.

@srobbin srobbin closed this as completed Nov 15, 2018
@martonlente
Copy link
Author

@srobbin Thanks for having a look at it, and considering this. I'll keep an eye on #6 thread, and I'm actually glad I'm not the only one with this idea. :)

@walidvb walidvb mentioned this issue Nov 15, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants