Skip to content
This repository has been archived by the owner on Feb 6, 2025. It is now read-only.

Document different layouts depending on category #130

Closed
juanmaguitar opened this issue Jun 24, 2020 · 2 comments
Closed

Document different layouts depending on category #130

juanmaguitar opened this issue Jun 24, 2020 · 2 comments

Comments

@juanmaguitar
Copy link
Member

From discussion at: https://community.frontity.org/t/moving-an-existing-wordpress-website-with-over-5000-articles/1477/23

Thanks for the quick reply! In Frontity can we handle the multiple post layout depends on category?

Sure.

You could use the [Switch component 1](https://docs.frontity.org/api-reference-1/frontity-components#switch) for example:

<Switch>
  <Layout1 when={data.category === "nature"} />
  <Layout2 when={data.category === "cities"} />
  <DefaultLayout /> {/* rendered by default */}
</Switch>

@mburridge
Copy link
Member

This could be a tutorial or even a blog post.

@juanmaguitar
Copy link
Member Author

This is kind of covered in the tutorial.frontity.org
And this "theory" can also be covered also in #264

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants