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

Layouts: add a visibility condition for selecting a specific entity ID. #1077

Closed
jenlampton opened this issue Jul 30, 2015 · 6 comments
Closed

Comments

@jenlampton
Copy link
Member

We need to add a condition to select a specific node ID (when the node context is available.) This is something that, I believe, existed for panels, and should be fairly easy to port.

Side note: we need this for the "find a module" page on backdropcms.org.

@quicksketch
Copy link
Member

For anyone else running across this, you can work around this lack of condition by using the "Path" selector, and only show a block when the Path is "node/x" where x is the node ID.

@docwilmot docwilmot added this to the 1.4.0 milestone Feb 7, 2016
@klonos klonos changed the title Layouts: add a condition for selecting a specific node ID Layouts: add a visibility condition for selecting a specific node ID. Feb 7, 2016
@quicksketch
Copy link
Member

I took a look at the PR in backdrop/backdrop#1239. Thanks @docwilmot!

I think the current PR would work, but it immediately stands out to me that this could be an Entity ID condition rather than just node IDs. Then it would work for user ID, term ID, etc. I think we have the abstraction in place to make this possible already. Normally I would say let's iterate, but as the plugin name gets stored in existing layout configurations, if we implement this as-is now we'd need an upgrade path if we make it generic for all IDs later.

@docwilmot docwilmot changed the title Layouts: add a visibility condition for selecting a specific node ID. Layouts: add a visibility condition for selecting a specific entity ID. Mar 29, 2016
@docwilmot
Copy link
Contributor

Updated to use entity IDs.
See backdrop/backdrop#1311

@quicksketch
Copy link
Member

Woo! Brilliant! Needs tests yet, otherwise fantastic. One issue with namespacing the IDs: https://github.com/backdrop/backdrop/pull/1311/files#r58301573

@docwilmot
Copy link
Contributor

Now has tests.

backdrop-ci referenced this issue in backdrop/backdrop Apr 23, 2016
Issue #1077: Add a condition for selecting a specific entity ID.
@quicksketch
Copy link
Member

Great! I merged in backdrop/backdrop#1311 for 1.4.0. We'll need to update #1020 to accommodate for this change in the tests.

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

No branches or pull requests

3 participants