Pode.Web icon indicating copy to clipboard operation
Pode.Web copied to clipboard

How about a ScriptBlock instead of just Layouts in Home Page Body

Open jbaechtelMT opened this issue 3 years ago • 1 comments

I have been trying to work around an issue where the Home Page only allows static content (Layouts) in the body of the page. I have had some success with using an iFrame page created as a Route. This does work but requires the iFrame page to supply only HTML coding which precludes the use of any native Pode.Web elements/layouts/pages.

If I create a Pode.Web page (Add-PodeWebPage) and -Hide it, when using that page as the iFrame URL the iFrame displayed in the Home Page body has a Navigation bar on it just like the one at the top of the Home Page.

I see three ways to solve this:

  1. Allow the use of ScriptBlocks in the Home Page body.
  2. Allow a switch (-NoNavigation) on the Add-PodeWebPage command so that it could be used to create hidden pages that could be referenced as the iFrame URL that don't display a Navigation bar.
  3. Create a Helper utility that would convert Layouts (Container; Card; etc.) and return pure HTML coding that could be used as the Value for the Write-HtmlResponse command.

Thanks!

Side Note: Pode & Pode.Web - Great Products!

jbaechtelMT avatar Oct 06 '22 19:10 jbaechtelMT

Hi @jbaechtelMT,

I actually thought I'd done this already! Then found this in my list of notes: 😂 image

So yes, I agree Home pages need a scriptblock 😄

Badgerati avatar Oct 11 '22 14:10 Badgerati