Include a page multiple times on a page - dynamic model names

  • 5
  • Idea
  • Updated 2 days ago
Hello -

There has been some discussion about not being able to have a Page Include appear on a Page multiple times.  

One of the primary challenges we face (and it appears others as well) is that often times the same "concept" (or extremely similar differing with conditional rendering) is needed on a page (e.g. in a drawer) or on different pages.  There has been discussion in the past regarding the ability to build a "component library" but currently, the only way to achieve re-use is via Page Includes or custom components.

One of the main obstacles for allowing multiple page includes this is that models are merged by name and since a page include uses the same model - well, let's just say some problems could arise.  

Idea - Would it be possible when pulling in a page include, to adjust the model names in the included page appending the page include _GUID?  For example, if Page Include has a Model of "Account" the merged model would be named "Account_246."  The xmlConfig of the page would need to be grepped and updated during runtime but assuming this was possible, it might eliminate at least one of the main barriers to allowing page includes multiple times.

Our pages are very complex and maintaining the same (or very similar) logic increases risk, support/maintenace costs, etc.  I find myself finding "creative" ways to solve for this but in doing so, often times, I lose the one of the main powers of skuid - the declarative page builder.  I have a number of "custom components" which essentially are just XML configs of stock Skuid components (e.g. skootable).  As much as I love writing code, that time could be spent on more domain specific business requirements.

Achieving the ability to use the page builder to create a "component library" would be ideal.  Short of that, possibly the GUID idea might lead to something where Page Includes could at least be a step in that direction.

Thanks!
Photo of Barry Schnell

Barry Schnell, Champion

  • 18,076 Points 10k badge 2x thumb

Posted 3 years ago

  • 5
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,006 Points 20k badge 2x thumb
Thanks for your creative ideas Barry. We are working on some ideas of our own too. Will take yours into account. 
Photo of Barry Schnell

Barry Schnell, Champion

  • 18,076 Points 10k badge 2x thumb
Good deal, thanks Rob!
Photo of Matt Sones

Matt Sones, Champion

  • 31,478 Points 20k badge 2x thumb
Any chance that multiple copies of a page include will be supported in the near future?
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,006 Points 20k badge 2x thumb
Not in the forseeable future.  Sorry. 
Photo of Shmuel Kamensky

Shmuel Kamensky, Champion

  • 4,328 Points 4k badge 2x thumb
How about now?
Photo of Conlan O'Rourke

Conlan O'Rourke

  • 3,280 Points 3k badge 2x thumb
Could this be achieved through Dynamic Creation of Models and Components?