Genie Discord forum

Author Avatarlyonsquark
11/29/2022, 4:58:09 AM

In the new framework, how do I set the title of the web page? (e.g. <title>Something</title>)? Do I need to specify a layout? Is there way to simply set the title of the page? I do have multiple routes and each should have a different title.

I see that has an optional title argument, but with the new framework, I never call this function (the page is already set up for the UI file).

Author Avataressenciary
11/29/2022, 10:40:45 AM

you can do @page("/path", "view", Stipple.DEFAULT_LAYOUT("your page title")) (not tested, lmk if it works - if it doesn't, use Stipple.ReactiveTools.DEFAULT_LAYOUT("..."))

Author Avataressenciary
11/29/2022, 10:41:03 AM

or ofc you can pass a totally custom layout

Author Avatarlyonsquark
11/30/2022, 5:32:01 AM

Thanks! The latter call worked, but I needed to explicitly name the title argument. For example,

@page("/projects", "projects.ui.jl", Stipple.ReactiveTools.DEFAULT_LAYOUT(title="WR Project"))
Author Avataressenciary
11/30/2022, 7:46:02 AM

ah yes, that's right ๐Ÿ‘