You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The mount is set on a collection level and I don't think you can reach it in your template. But your issue is about the actual route giving a 404 right?
So when you visit yoursite.test/mount-slug/entry-slug you got a 404 is what I got from your initial issue.
I noticed you used a different syntax. Have you tried my suggestion?
The mount is set on a collection level and I don't think you can reach it in your template. But your issue is about the actual route giving a 404 right?
So when you visit yoursite.test/mount-slug/entry-slug you got a 404 is what I got from your initial issue.
I noticed you used a different syntax. Have you tried my suggestion?
The route works fine. I want to reach it in my template, there is a variable, mount:null if I check variables on debugbar
I think it's supposed to work like that. It's only available on the entry where you mounted the collection on.
I've been in multiple use cases where I need to get a collection's mount entry URL so you can do stuff like "Go back to all news" / "Go back to all mountains".
There's no native tag for this. There is a FR out: statamic/ideas#301 and a solution in the comments (link to forum).
I'm running into this same issue. If the mount is null, how can I access the page data the collection is mounted on? I too want to be able to do mount:title or something similar.
Bump - We are facing the same issue with a similar twist: When configuring a "mount" entry on a collection, all items of that collection will indeed get the correct (and site-/locale-dependent!) url-prefix of the "mounted" entry, but the "parent" and "mount" value of these items will remain empty (in 90% of the cases... really strange). Also, the "Add/Edit" link that is displayed next to an entry that was linked as the "mount" value on another collection will only be visible in the site/locale it was linked in.
Same or similar issue here: Randomly, the mount is missing on some collections. Feels like the entries with the {mount} in the urls are stached before the mounted entry is available. Could this be possible? In what order is the stache generated?
Activity
robdekort commentedon May 5, 2021
Hmmm, seems to work fine here with this syntax:
/{mount}/{slug}.lostika86 commentedon May 6, 2021
Can you reach the mount variable?
{{ mount | dump }}is null for me. Debugbar shows onmountnull toorobdekort commentedon May 6, 2021
The mount is set on a collection level and I don't think you can reach it in your template. But your issue is about the actual route giving a 404 right?
So when you visit
yoursite.test/mount-slug/entry-slugyou got a 404 is what I got from your initial issue.I noticed you used a different syntax. Have you tried my suggestion?
jasonvarga commentedon May 6, 2021
mountwill be the handle of the collection on the entry that has been mounted to it.Seems to work fine.
In your example, within entry
28124839-6062-43bd-8e4e-ca7a11af3b7a,{{ mount }}will be the handle of whatever collection's yaml file you pasted.robdekort commentedon May 6, 2021
I'm not sure what the real issue is tbh. Can you explain in detail what you are trying to achieve and what you think is the issue?
lostika86 commentedon May 10, 2021
The route works fine. I want to reach it in my template, there is a variable,
mount:nullif I check variables on debugbarlostika86 commentedon May 10, 2021
I want to simply use in my template for example:
{{ mount:title }}.lostika86 commentedon May 10, 2021
another way to explain:


current entry belongs into
categoriescollectionthe
mountvariable isnulljasonvarga commentedon May 10, 2021
What's the
idfor the current entry in that same debugbar list?lostika86 commentedon May 10, 2021
The

idisI thought commit
b3b4a179is for enable mounted entry in template. Maybe I think it wrong...lostika86 commentedon May 12, 2021
robdekort commentedon May 12, 2021
I think it's supposed to work like that. It's only available on the entry where you mounted the collection on.
I've been in multiple use cases where I need to get a collection's mount entry URL so you can do stuff like "Go back to all news" / "Go back to all mountains".
There's no native tag for this. There is a FR out: statamic/ideas#301 and a solution in the comments (link to forum).
Hope this helps!
robdekort commentedon May 12, 2021
Closing this, feel free to reopen if I'm wrong.
edalzell commentedon Feb 2, 2023
I'm in a multi-site and the
mountvar is null oncareerentry pages (which are mounted to acareerspage).IMO it should be the entry to which that collection is mounted.
jasonvarga commentedon Dec 6, 2023
This has been reverted in #9145 as it causes some issues. We'll revisit it in another version.
isaackearl commentedon Apr 13, 2024
I'm running into this same issue. If the mount is null, how can I access the page data the collection is mounted on? I too want to be able to do mount:title or something similar.
925dk commentedon Aug 14, 2024
I'm looking for the same. Seems no good way to get say the mount title. Doing this as work-around:
The string replacement stuff seems necessary also, since
mount_urlreturns full path for multisite, andget_contentneeds it without.carstenjaksch commentedon Dec 8, 2024
The workaround from this issue is not available anymore.
I want to do the same thing, any updates on this?
duncanmcclean commentedon Dec 9, 2024
@carstenjaksch Have you seen @925dk's workaround above? Does it work for you?
carstenjaksch commentedon Dec 9, 2024
@duncanmcclean Yeah, I tried and mentioned it in this discussion: #11237
It works for now, I was just curious if the official solution would return.
duncanmcclean commentedon Dec 9, 2024
The previous fix broke a bunch of things so it had to be reverted. We might fix it another way in the future, but I don't have an ETA on that.
FlxRobole commentedon Apr 16, 2025
Bump - We are facing the same issue with a similar twist: When configuring a "mount" entry on a collection, all items of that collection will indeed get the correct (and site-/locale-dependent!) url-prefix of the "mounted" entry, but the "parent" and "mount" value of these items will remain empty (in 90% of the cases... really strange). Also, the "Add/Edit" link that is displayed next to an entry that was linked as the "mount" value on another collection will only be visible in the site/locale it was linked in.
j3ll3yfi5h commentedon Jul 18, 2025
Same or similar issue here: Randomly, the mount is missing on some collections. Feels like the entries with the
{mount}in the urls are stached before the mounted entry is available. Could this be possible? In what order is the stache generated?Also not nice to have them in the google index with the mount and one day without:
Correct and indexed: https://g-m.swiss/maerkte/sport-mehrzweckanlagen
Right now: 404 -> available under https://g-m.swiss/sport-mehrzweckanlagen
edalzell commentedon Nov 15, 2026
Can someone who can reproduce this give #15908 a try and see if it fixes it for you?