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

Shortcodes are not resolved for content types in bag parts #15804

Closed
giannik opened this issue Apr 22, 2024 · 2 comments
Closed

Shortcodes are not resolved for content types in bag parts #15804

giannik opened this issue Apr 22, 2024 · 2 comments

Comments

@giannik
Copy link
Contributor

giannik commented Apr 22, 2024

When you create a content item within a bagpart and the bagpart content item has a shortcode to render say an image ( [image]post-bg.jpg[/image] ) then it does'nt display the image in display mode.

To Reproduce

1.Using the blog theme recipe create a new contenttype and add a bag part that contains content types of type Article .
2. Create a new instance and add an article to the bag part and in the article html body part add an image : [image]post-bg.jpg[/image]
3. When displaying in the front end the image does not display

If you create a standard article content item with same shortcode then the image shortcode renders correctly.

@Piedone Piedone added this to the 1.x milestone Apr 25, 2024
@Piedone Piedone removed this from the 1.x milestone Apr 25, 2024
@Piedone
Copy link
Member

Piedone commented Apr 25, 2024

This is not exactly a bug but something that seems unclear when using Bag Part: the shortcode itself works, but is not displayed.

This is because when opening the standalone Article, it's displayed in Detail display type, with the body rendered as-is. When displayed in Bag Part, it uses the Summary Display Type, and thus HtmlBodyPart.Summary. That strips tags, so the formatting of content items in a list won't get messed up.

If you configure "Detail" for the Display Type under the Bag Part's settings, then you'll see the same as when opening a standalone Article:

image

@giannik
Copy link
Contributor Author

giannik commented Apr 25, 2024

Oh @Piedone your are correct. I missed the display type setting.
Thank you.

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

2 participants