Using content from post on collections base page

I have a five part post series that I want to publish under a custom collection I will define in routes.yaml.

On the collections base page, example.com/collection/, I want to have a brief explainer about the collection/series. My thought was to publish a post with that information with the same url, but the custom collection overrides the post.

Does someone help me find a way to do this?

Hey @adalsteinnk! You could use the content from a page and use the #get helper to pull that page content into the top of the collection page? That’s how I would do it. Take a look at the docs about using the #get helper to pull content from a certain page or post:

(See the {{#get "posts" id="2"… example)

2 Likes

That did it!

Thank you :smiley:

1 Like

Hey @DavidDarnes

Would you mind showing me the correct usage for this?

If I’m trying to add content from a page to match a collection, how would I match the collection slug to the page?

{{#get "pages" filter="slug:{{current}}"}}

Thanks in advance.

I’m not sure this will work, but I suppose you’ll want to change current to the current page slug. What are you trying to achieve? Page content for each collection page?

hey @DavidDarnes

any thoughts on how I can change the meta title on a collection page?

Hey @DavidDarnes

Thanks for getting back to me. I hope you are well sir.

Yes, what I would like to do is have a landing page for each collection with an intro. Something similar to this page: Phu Quoc - Cruising Vietnam. However, with this page, I’ve built a collection template just for that collection. I was wondering if there was a way to do this dynamically matching a page URL or tag to a collection.

Please don’t clutter forum threads with other topics that aren’t relevant. I’ve chipped in on the original thread

Would it not be cleaner to use tag descriptions for this? Seems the most suitable I think, because that’s what they essentially are :blush:

I apologize for hijacking

1 Like

Hey @DavidDarnes thanks for the reply. I wanted more than 500 characters as I’d like to use that collection page as a pillar piece with the ability to add images, etc. But it’s fine, I’m just going to create a template for each collection. That way I have more control and flexibility over the content. Thanks so much for your help, really appreciate it.

Ah I see! Sorry I wasn’t able to help more accurately, but pleased you found a solution :blush: