1

Is there a way to insert pre-formatted objects (like a standardized sign-up form) in line in content via wysiwyg (a'la the fantastic wysiwyg-templates module), but encapsulated and protected...

I actually love that w-t can insert snippets, and will continue to use it, marketing likes to insert the same search form they always use and then change 2 words to test if that drives conversions. For what it does, w-t is perfect.

HOWEVER...

Having done that, I now want to pop in content in exactly the same method, except LOCKED so it can't be edited, but so I can still SEE it, and potentially move it around the page as though it were an image.

I'm not expecting too much for response, but if I end up really needing it I'd rather hear what other ideas are out there than build something myself that has already been done.

(background to be posted in a comment below for context)

  • (included to explain why Blocks/Panels/Context aren't going to work {as far as I know}) I've built a system for marketing to generate landing pages in Drupal 7, giving them great control without nerd skills and little ability to do damage. The end result is a magnificently large node definition that has a dozen text area fields that can be edited by the marketer that is building the landing page. It has a separate node type template, which handles all the blocks separately from the rest of the theme (it turns them off and creates similar options that can be toggled by the designer). – OhkaBaka Mar 13 '13 at 20:41
  • 2
    you might want to create a new field for that and use something like drupal.org/project/field_permissions to prevent moderators from editing those – Andre Baumeier Mar 13 '13 at 20:48
  • I am currently protecting the wysiwyg templates, but once they are injected into the document, they can be edited... having it in a separate field doesn't meet the requirement of being insertable (as I understand)... I'm thinking of it same as with an image... you can use IMCE to drop in an image, and then once its on the page you can move it wherever, manipulate the exterior css (scale, border, etc)... but you can't edit the picture... I would love to see (and not have to build) a plugin that could do the same with a div object and all the code inside it... – OhkaBaka Mar 15 '13 at 20:37
1

The perfect solution hasn't presented itself, but I settled on using specialized content types inside a parent content type, (via Entity & Entity Reference fields) and then using Better Formats, Wysiwyg with CKE, Fieldgroup, Conditional Fields to make a user interface that presents all the myriad options in a nice clean manner.

I'm kinda proud of the result, I expect I'll eventually reuse the system somewhere more public so I can show it off.

  • sounds promising – do you have anything to show yet ? – tillinberlin Feb 19 '15 at 15:58
  • No... the end result was enormous fun to write, and was ridiculously configurable drag and drop magic... but the project got killed and I haven't had the commitment to rebuild it. I should... it is the coolest thing I've ever (almost) finished. – OhkaBaka Feb 19 '15 at 18:12
  • 'ridiculously configurable drag and drop magic' sounds really great – I hope I'll digg into that some day… Thank you! – tillinberlin Feb 20 '15 at 10:47
0

What about an input filter?

https://api.drupal.org/api/drupal/modules!filter!filter.api.php/function/hook_filter_info/7

In this way, you could define a token (or similar), which would be translated into the output you need. Editors could move the token around, while not having access to the value itself. Added bonus of being able to change the output without editing all the wysiwyg content values.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.