Can repeater content be duplicated?

  • Hi,


    I have the following two blocks:


    and

    which have I believe, what are identical code structures that I would like to replicate content for.


    I was wondering if simply using the same id="" for a <perch:repeater></perch:repeater whether the content will simply be replicated in the same way that id="hidden" can be used to duplicate content for text fields.

  • Hi ellimondo,


    I feared that would be the answer, having to mess around with regions or custom content but I'm still unsure as to whether or not what I am asking is actually possible.


    If not, I would submit that a feature request and/or poll is in order, particulary if users are going to be asked to stump up more money going forward.


    Cheers

  • Hi,


    Thank you for the question Hussein but the answer is no because even though content is duplicated in some pages, to account for a responsive page; I figure search engines would potentially pay attention to display:none; since in some pages I have different content in the upper block, such as an image in Desktop view.


    To the wider forum and developers, would this be a candidate for a feature request because it's kind of tiring having to duplicate all the time when you make a change in one repeater only to have to re-enter the same information in another.


    Cheers

  • While I am not against the idea of being able to duplicate content (page, block, repeater item, collection item, region item, etc), I don't think it is the ideal solution to your particular use-case.


    Even if the feature existed, every time you make a change to the desktop block you would have to delete the existing mobile block and duplicate the desktop block again.


    Ideally the editor would enter a piece of content once. The rest should be up to the developer. However, I understand how this can sometimes be tricky when building modular pages with Blocks.


    I personally would use a single editable section for this even if I need to output the same set of links multiple times with different HTML. I think it is the most user-friendly option for the editors. As a rule of thumb, whenever you find yourself (or your editors) having to re-enter content, it is a good time to evaluate your content structure.


    If it does not make sense to manage this in a block (for technical and/or editor-experience reasons), you can add the fields outside the blocks even if you still want to give the editors the flexibility to choose where the links are displayed via blocks. Perch is flexible in a lot of ways. You can add a block with a single select field to specify which style (desktop/mobile) links to output and bring the content from outside the blocks.