Skip to content
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

support links in resource short codes #523

Closed
3 tasks
pdpinch opened this issue Mar 15, 2022 · 0 comments · Fixed by #538
Closed
3 tasks

support links in resource short codes #523

pdpinch opened this issue Mar 15, 2022 · 0 comments · Fixed by #538
Assignees

Comments

@pdpinch
Copy link
Member

pdpinch commented Mar 15, 2022

On legacy OCW, there are >1000 images with links on them.

For example, from CMS6.11J F14

[{{< resource 69e1f411-a309-0f84-2b21-fa36db9f1d60 >}}  
](/ans7870/CMS/CMS.611/f14/games/cholera_control_final/index.html)

As currently constructed, we have no way to render these. To address this, we would like to add two optional parameters to the resource shortcode:

  • href where the value is set to a full or partial URL. When set, the resource (typically an image) would be wrapped in an anchor tag with an href attribute, with the value set to the passed value.
  • href_uuid where the value to set to the uuid of another resource (typically a page, or a resource). When set, the resource would be wrapped in an anchor tag, with an href attribute, with the value set to a URL for the resource.
  • having both parameters set is not supported. It's OK to use the href value in this case.

Related issues

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

Successfully merging a pull request may close this issue.

2 participants