Aller au contenu principal

ContentCreator - EasyEdit for Datasources within Page Template

Commentaires

4 commentaires

  • Zendesk API User
    Author: mbergmann - 1/22/2016 10:14

    Hi Seth,

    in general, the editorId() function needs to know what element you want to edit. FirstSpirit enriches the editorId() call by the "current template context" so that you do not have to provide all that information yourself.

    In your case, I think the reason for the problem is that you are rendering a table template, but are in reality inside a "page generation context" because you call it from "outside".

    So you will have to add some parameters to the editorId() call, I think the following should work:

    $CMS_VALUE(editorId(editorName:"tt_copyright", entity:set_row, view:"UID_OF_YOUR_DATASOURCE"))$

    or

    $CMS_VALUE(editorId(editorName:"tt_copyright", entity:set_row, template:"UID_OF_YOUR_TABLE_TEMPLATE"))$

    Michael

    0
  • Zendesk API User
    Author: seth_w_jackson - 1/22/2016 16:08

    Thanks Michael. That really helped. There's only one outstanding issue.

    This was the correct fix for the EasyEdit:

    <p class="footer-copyright"$CMS_VALUE(editorId(editorName:"tt_copyright", entity:set_row, template:"standard.footers"))$>$CMS_VALUE(set_row.copyright)$</p>

    However, the onhover in ContentCreator doesn't present the fancy edit button in the upper-right corner. However, a long click on the copyright will allow inline editing that will save properly.

    0
  • Zendesk API User
    Author: mbergmann - 1/22/2016 20:29

    Hi Seth,

    The editorId(...) containing the editorName parameter ONLY creates the InEdit functionality. To create the "hover frame", you have to use almost the same editorId(...) syntax, just WITHOUT the editorName parameter.

    Add it to a surrounding tag (e.g. a <div>) that represents the area to be highlighted by the border.

    The editorId calls are completely independant from each other, so if you want both the "hover border" with the upper right hand buttons to open the complete dataset's form AND the InEdit functionality to directly edit single fields, you need BOTH versions (in different html tags): One for the complete form and one for each field you want to offer InEdit for.

    Michael

    0
  • Zendesk API User
    Author: seth_w_jackson - 1/25/2016 20:47

    Michael,

    Ok, that definitely helped me figure this one out. The end solution was that the parent html node for the entire section (a section node instead of a div) needed to be the following:

    <section class="site-footer"$CMS_VALUE(editorId(entity:set_row, template:"standard.footers"))$>

    This enabled the buttons to edit the datasource that was embedded in the page template.

    Thank you for all your help!

    Seth

    0

Vous devez vous connecter pour laisser un commentaire.