Forum Replies Created
-
AuthorPosts
-
August 24, 2017 at 8:20 pm in reply to: Add css class in editor ui to all builder elements globally #843671
update: just checked 4.1.2 and found a bunch of new entry points,
Will check the updated code, before posting again here – thanks for pointing me into this direction.
-ElmarAugust 24, 2017 at 8:13 pm in reply to: Add css class in editor ui to all builder elements globally #843670Hi Ismael,
thanks for your feedback. I checked my dev. theme here (might not be the latest, it is: 4.0.7), I don’t find a hook named “avb_backend_editor_element_data_filter”. It this something that has been added recently?
Hooking admin_head for JS is fine, but I am dependant one values inside the update_builder_html() method, thus I cannot simply oberserve the backend from “outside”.
Will keep on trying and researching ;-)Best
-ElmarAugust 21, 2017 at 10:25 am in reply to: Add css class in editor ui to all builder elements globally #841930sorry, to be more precise: I changed two files, one for the initial loading, one for immediate update after saving the modal dialog
/config-templatebuilder/avia-template-builder/php/shortcode-template.class.php
in create_sortable_editor_element()if( $params['args']['disabled'] ) { $class .= ' disabled'; }
and in config-templatebuilder/avia-template-builder/assets/js/avia-builder.js
in update_builder_html()if( values.disabled == 'aviaTBdisabled' ) { element_container.addClass('disabled'); } else { element_container.removeClass('disabled'); }
I am looking for a way/trick/hack to safely override these two points.
August 18, 2017 at 4:47 pm in reply to: Add css class in editor ui to all builder elements globally #840923Hi John,
I am confused…. it’s not a problem coding the modification for me – but it will be lost with the next update and I am seeking a hint, if someone has an idea for an upgrade-safe way to get this done. I don’t see any hook, filter or other mechansim that allows me to override this core functionality.
Thanks
Elmar
August 16, 2017 at 5:55 pm in reply to: Add css class in editor ui to all builder elements globally #840020Hi Victoria,
sure, as a site is work-in-progress one might disable parts of the contents with my small code addition. There will be an additonal checkbox in my setup with “disable this element” if you edit an element. But in the overview you won’t see, if an element is currently disabled or not.
Here I’d like to add a class to the visual builder, if an element has the attribute “disabled” = trueIn this case I might render the layout builder like this:
http://www.evernote.com/shard/s2/sh/fee58f4e-0bb3-4de6-b0a9-9c64964cc252/41522809ee6427e12667302385256e55This will give us a similar functionality to Typo3, having active/inactive elements.
https://docs.typo3.org/typo3cms/EditorsTutorial/singlehtml/_images/PageModuleColumns.png (No. 4)I’d like the idea in visual composer, where the builder UI shows e.g. the current background image and color as small spots
http://www.evernote.com/shard/s2/sh/92418e73-fb51-49fc-87bd-a3c2397544f5/5b329753997778426fdfbf4897ffc1eeI would love to add similar extensions to the builder UI based on vaious attributes. But I don’t find an upgrade-safe place to add my code.
I hope this is more clearly.
Thanks
-Elmar -
AuthorPosts