h.url_for not working in some templates #6046
-
CKAN version Describe the bug Basically, I'm trying to copy the link from the
Steps to reproduce Expected behavior |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 1 reply
-
I doubt url_for is the issue here. When you copy and paste helper calls between templates and it fails, you probably are missing some variable from the new template. It should tell you why it fails in the logs or in the UI itself if you turn on the debug mode. |
Beta Was this translation helpful? Give feedback.
-
Thanks @Zharktas for your email, you were correct - it's not the The I've logged out all the available variables, but I can't see any option. To sum it up, I just want to be able to access the value of My current line of code in full is this, (but Thanks for any help. |
Beta Was this translation helpful? Give feedback.
-
@pauldcollins in |
Beta Was this translation helpful? Give feedback.
-
But as this is not a bug in CKAN and is more of support request, I'll convert this to discussion. |
Beta Was this translation helpful? Give feedback.
-
Hi @Zharktas thanks for moving this to a discussion. I've been trying to get this working the last few days. Unfortunately, the issue is I already have the Is there any way I can access that Thanks again |
Beta Was this translation helpful? Give feedback.
-
@pauldcollins as it was mentioned above, the |
Beta Was this translation helpful? Give feedback.
@pauldcollins as it was mentioned above, the
resource_views
variable should be available and it should be a list ofresource_view
dicts. For testing purposes you can tryresource_views[0]['id']
but this will always give you the first one.