Site logo

[Support request] Preview for Dynamic Fields

Home Forums Support [Support request] Preview for Dynamic Fields

Home Forums Support Preview for Dynamic Fields

  • This topic has 7 replies, 3 voices, and was last updated 5 years ago by Tom.
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1714653
    Dan

    Following up on the discussion here:
    https://www.facebook.com/groups/generatepress/permalink/3750194028369480

    About dynamic fields and templates, I asked Leo if there is an option for showing a preview of the dynamic fields. So if for example we set a Title, description, featured image – it will all be pulled in as a preview in the template from the real blog posts.
    This feature helps while designing the templates and seeing real content.I mentioned that Elementor has a similar feature, I’m attaching a link to a google doc which shows how this works.
    Hopefuly this can be implemented in GP 2.

    Google doc link:
    https://docs.google.com/document/d/1NzJsB6lyOYkENorhL_E2zh-MX7pOrcCJ_9PS7ZZIrGw/edit?usp=sharing

    Thanks!

    Dan

    #1715163
    David
    Staff
    Customer Support

    Hi there,

    i’ll pass this onto Tom but i believe that will be complicated.
    The method the Dynamic Content uses is a simple string replace. ie. the static text you see in the editor is saved in the template, this is is then swapped out for the dynamic content on the frontend. Although you can edit the auto text a headline adds – it is best that this is kept short BUT it has to be static for the system to work.

    And i am not sure how a separate Preview option in the editor would work, but as said ill pass onto Tom.

    My personal method is to design the content i draft page using dummy content that matches the site. When i am happy with the display, i copy the blocks into a Block Element and swap out the elements for dynamic content / blocks.

    #1715180
    Dan

    Thanks David.
    I understand the way it currently works and your workflow.
    I think that having a preview can actually make the editing experience faster, better and with a higher fidelity to the ‘end product’.
    Would love to hear Tom’s thoughts about this, maybe for a 2.1?

    Thanks again for your great work,

    Dan

    #1715575
    Tom
    Lead Developer
    Lead Developer

    Hey Dan,

    The only way a preview would work is if we randomly chose a post to draw the data from. This is because the current method pulls dynamic data from the current post depending on what page you’re viewing on the site. I considered doing this (pulling from the latest post), but I figured it may actually get in the way of some designs instead of help.

    It’s definitely worth some thought, I’ll dig around to see if there are any good examples.

    #1715583
    Dan

    Thanks Tom,
    Let me know if you need my support on this (Testing, UI or creating a demo site for this purpose).
    The best scenario would be to allow the user to select the category from which to load the dynamic data preview (as you can see in the Elementor example).

    Dan

    #1716973
    Tom
    Lead Developer
    Lead Developer

    I haven’t played with Elementor much, but do they give you an option to specify the data source for the preview only? I assume this data source doesn’t do anything on the front-end?

    #1716991
    Dan

    Yes, they allow you to pick the category data source if you are editing a category template, for example a specific category, and a single’s post data source if you are editing a single post template.
    The data source is just for previewing in the backend and does not have any influence on the frontend.
    I’ve added some screenshots in the google doc, in case it’s not clear enough, here is the image of the single template:

    https://www.dropbox.com/s/2zkger68tvso2u6/dynamic-fields-single.jpg?dl=0

    #1718120
    Tom
    Lead Developer
    Lead Developer

    Got it – thanks for that! I’ll see what I can do 🙂

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.