-
Notifications
You must be signed in to change notification settings - Fork 11
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
Feature request: Check if there is a visible Paragraphs item before displaying a Paragraphs field #100
Comments
@Retsell Can you add a screenshot or slightly more detail? This also may depend on how we handle unpublished Paragraphs items on the front end -- @klonos suggests keeping them visible for admins but with a background that makes it clear they are unpublished (which would allow re-publishing from the front end as well). |
@klonos Here's what I tried: (I'm new to paragraphs, so maybe it's not supposed to be used like this?) I thought it would be great for making a paragraph available on my site that is dedicated to vintage motor yachts, that would contain for-sale information for those boats that are available. I would also like to turn the paragraph off once sold, but retain the information for later use if needed. Unpublishing a paragraph titled "For Sale Information" would do the trick nicely. Except that when I turn off the paragraph, it still displays the title on the page, i.e. it shows "For Sale Information" and then no for-sale information. If the paragraph is unpublished. why have the title of the paragraph still displayed? |
Is "For Sale Information" the label/name of the entire Paragraphs field? (If so, is it accurate to say your request is to remove/unpublish the entire field if there are no published Paragraphs items within it?) Showing unpublished Paragraphs items would be only for those with administrative access, not the general public. |
@Retsell The issue is that the field label is for the entire field, and the unpublishing option is for the individual Paragraphs items within the field (of which there may be more than one on a multivalue field). I'll leave this open to explore at some point if it's possible to have a check to make sure a Paragraphs field has at least one visible item before displaying the field at all. In the meantime you can hide the Paragraphs field label in the content type "Manage display" screen, and show the field title in the Paragraphs type as a workaround. |
@laryn Thanks for looking into it. I hadn’t thought about the multivalue field aspect. The work around is easy enough in my case. |
@Retsell This should be fixed in the next release. |
If the paragraph title is set to be displayed for a paragraph, the title remains displayed after the paragraph is unpublished. The title should disappear too. (Using 1.x-1.2.0-alpha1)
The text was updated successfully, but these errors were encountered: