Clone a Skuid button

  • 1
  • Question
  • Updated 4 years ago
  • Answered
Is it possible to clone one of my buttons in Skuid on the same page as the original button? I have a few buttons with a lot of specific actions that vary slightly based on rendering conditions. It would help greatly if I could clone that button and just make the minor change instead of recreating that entire button. Is this possible?
Photo of Craig Rosenbaum

Craig Rosenbaum

  • 4,776 Points 4k badge 2x thumb

Posted 4 years ago

  • 1
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,006 Points 20k badge 2x thumb
There is no specific "Clone" or "Copy" function within the builder.  But you can view the XML that is underneath the page and copy and paste buttons there.   Once your page is saved, go to the bottom right hand corner of the page and select the "View/Edit XML"  link. 
Photo of Craig Rosenbaum

Craig Rosenbaum

  • 4,776 Points 4k badge 2x thumb
That makes sense. Thank you!
Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,714 Points 20k badge 2x thumb
yw. I mess tinker with the XML probably more than I should. ;)
(Edited)
Photo of Craig Rosenbaum

Craig Rosenbaum

  • 4,776 Points 4k badge 2x thumb
I've never worked in the XML of pages. Are there certain advantages to working there instead of the page constructor?
Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,714 Points 20k badge 2x thumb
Well .... mostly copy and paste. There are other things you can only do in XML, but they are only kinda recommended practices when the need arises. ie. query a model within a page include from an action on the main page. Without javascript, this is only possible by manually editing the XML.
Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,714 Points 20k badge 2x thumb
Another example, which is certainly "hacking", would be to set settings on filter such multi select on a reference field is made possible. Problem is that doing something like this is NOT supported. In other words, the Skuid development has no inclination or need to continue supporting a hacked together solution. There is a good chance they will not do anything different when they make this possible, but that is far a guarantee.
Photo of Irvin Waldman

Irvin Waldman, Champion

  • 9,006 Points 5k badge 2x thumb
Take a peak inside the kimono. Insight will make you a better Skuid. :)