Landing Pages Plugin 🛩

This looks exciting. Hoping to use a landing page to list upcoming events, or at least by tag.

Thanks!

Thanks for the patch! That works well. Do you think that it would be reasonable to add a config option for the landing homepage path? I tried other solutions to set a custom home page, but this is the only one that actually worked for me and this landing pages plugin.

Is there a way to access values from the plugin variables in the plugin.rb file?

@angus, is there a way to render the content of certain custom landing pages inside the normal Discourse layout instead of the layout for the landing pages plugin?

Not directly, but perhaps explain a bit more about what you have in mind and I’ll point you in the right direction.

I’m wondering if we can have the content of the custom landing pages load directly inside the main Ember app container layout rather than the landing pages layout?

I know now that Discourse has the option to turn topics into static pages, but I’d rather not have the author info at the top or have the page URLs nested under /pub/.

I have one example where I’d like to link to one of the static pages in the nav using the custom nav items component, but because it is not a path that the Ember app recognizes, it gives a 404 page when clicking the link in the header. If you navigate directly to the page URL it works fine, but not through Ember app links.

Is this plugin mostly meant to only work with static landing pages for when the user is not logged in or signed up, not inside the main app layout for logged-in users?

I see.

Is this the only reason you’re interested in rendering the content of landing page in Ember? If so we can handle that in a more lightweight way.

Thank you. I’m hoping to be able to render either the built in Discourse pages or those of the landing pages plugin inside the ember app layout as informational pages for site members.

Some pages are for the public and can be rendered in the landing pages plugin layout and others will be for logged-in users and should be rendered in the main app layout so the customizations I’ve done for the main app can be persisted including custom nav items and the user menu.

There doesn’t seem to be any existing way to do this with plugins or the Discourse core. Everything seems to be using their own layout for custom pages. Do you know if this is just a use-case limitation by existing solution’s developers, or a limitation of the Discourse platform itself?

I’m imagining that it involves more or less pulling custom pages from an API endpoint and using the slugs to match against the wildcard falback path in the js router?

hm, the distinctions you’re drawing here will make less sense once you get into the weeds a bit more.

Can you give me an example of this kind of page? Yes it’s true that the landing pages plugin doesn’t include the discourse nav items and user menu, however if you want those in a page, it’s best to create it for each specific use case within the Discourse app itself on a case by case basis. Trying to recreate them in a landing page wouldn’t make sense.

The reason there isn’t a generic way of doing this is because there isn’t a generic use case per se. There’s a number of approaches you can take, the best one will depend on what you’re looking to achieve. It’s best if you lay what you’re trying to do in more detail, then I can give you more specific advice.

Start a new topic in #dev or over on Discussion - Pavilion explaining what you’re doing in detail and @me.

Alright, thank you. I’ll do that :blush: