Comments (2)
From my understanding of http://blog.apps.npr.org/pym.js/api/pym.js/1.2.0/module-pym.Child.html, the id
in every pymChild
configuration should be pym_0
for this embed. The id
parameter is supposed to match the ID on the parent page, not set it. The ID of the parent doesn't change, so the ID on every child page needs to be set to match the parent. In http://blog.apps.npr.org/pym.js/#example-follow-links, both of the child pages have and id
match the ID of the parent iframe.
I'm not sure if there's a way to automatically set the ID of the child to match the ID of the parent element; perhaps you could do this with a small Javascript script and a query parameter ?pym_id=example
that is applied to the first child page loaded. The JavaScript would check for the presence of that query parameter, and if it is set, add that query parameter to all the links in the child page. When the link is clicked, the new child page would have the query parameter, so the JavaScript on the new child page would set it as well.
We should probably make a new pym_id
parameter on the shortcode that allows end users to configure the ID of the generated embed on the page, but I don't think that's going to fix your problem in this ticket.
from pym-shortcode.
@KatieMFritz the next version of the Pym Shortcode will include an id=""
attribute that will allow you to set a custom ID on the iframe, to solve this problem: #25
from pym-shortcode.
Related Issues (20)
- rename text domain HOT 1
- React is dropping className for class HOT 1
- Add CONTRIBUTING.md
- contributors: inn_nerds becomes innlabs
- Tag 1.3.2.1 HOT 2
- Test against Gutenberg 4.0 and WP 5.0
- Gutenberg Block failing for me on Wordpress.com HOT 4
- Editor JS not enqueued in WordPress 5.0-beta versions HOT 2
- AMP support? HOT 6
- php error with latest version? HOT 6
- Test in Reader Mode in various browsers HOT 2
- Remove Pull Request Template from this repo so it's covered by INN's org-wide PR template HOT 2
- typo in docs: nwesroom
- Text domain corrections
- Release checklist for tagging version 1.3.2.3 HOT 2
- Update support.inn.org docs
- Release checklist for tagging version 1.3.2.4 HOT 3
- Test against WordPress 5.4 RC HOT 1
- Review `http:` strings in plugin and update to `https:` where possible
- Release checklist for tagging version [next]
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pym-shortcode.