-
-
Notifications
You must be signed in to change notification settings - Fork 553
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
variable mount is null on every page #3625
Comments
Hmmm, seems to work fine here with this syntax: |
Can you reach the mount variable? |
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 I noticed you used a different syntax. Have you tried my suggestion? |
Seems to work fine. In your example, within entry |
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? |
The route works fine. I want to reach it in my template, there is a variable, |
I want to simply use in my template for example: |
What's the |
|
I think it's supposed to work like that. It's only available on the entry where you mounted the collection on. 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! |
Closing this, feel free to reopen if I'm wrong. |
I'm in a multi-site and the IMO it should be the entry to which that collection is mounted. |
This has been reverted in #9145 as it causes some issues. We'll revisit it in another version. |
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. |
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 |
The workaround from this issue is not available anymore. I want to do the same thing, any updates on this? |
@carstenjaksch Have you seen @925dk's workaround above? Does it work for you? |
@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. |
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. |
Bug Description
Mount variable is missing from collections entries. It is attached as in the docs. Last time worked correctly,
How to Reproduce
{{mount}}/{{slug}}
)Extra Detail
Few weeks ago worked correctly
Environment
Statamic 3.1.11 Pro
Laravel 8.40.0
PHP 7.3.12
doublethreedigital/duplicator 1.3.1
Install method (choose one):
statamic/statamic
The text was updated successfully, but these errors were encountered: