I'm trying to combine apps to display a simple news article with blue imp gallery inside. But the Visual Query (VQ) doesn't seem to allow this from my basic user perspective even with specifying the app id in the VQ. So that the image gallery displays with a particular article. Also, when I attempt link the gallery in the source editor that is also not allowed: @RenderPage("[App:28]_gallery-inner-list.cshtml?[Content:Gallery]"). I didn't think this would be too complicated for either solution but apparently it is. Guidance Needed.
Asked
Active
Viewed 39 times
1 Answers
0
I had the same task in my project. My steps are:
Add a Field to the content type Article. Name: Gallery Fieldtype: Entity
In the Settings of the Gallery-Field uncheck "Visible in Edit UI" and leave entityType blank!
In the Template for Article insert following Code, where you want to show the Gallery: (where "yourname for the article" is your Contentvar)
<div class="sc-content-block-list" @Edit.ContextAttributes(<yourname for the article>, field: "Gallery")> @foreach(var contentBlock in AsDynamic(<yourname for the article>.Gallery)){ @contentBlock.Render() } </div>
Save your template and have a look at your article. When you hover to the point, where your inserted code is, you got this: ContentBlock
Here you can click at the middle button and then choose the blueimp-Gallery BlueImp and the template.
Now you can enter new data or choose existing from the Gallery.
This is possibe with any App/Template in your system!
Nice Job Daniel!

Andreas Flohr
- 38
- 4
-
@Carmina this is a very advanced feature and the necessary code blocks only work in razor (C#) – iJungleBoy Sep 24 '16 at 08:40
-
@CarminaBurina please mark as answered if this answers your problem (which it probably does :) – iJungleBoy Oct 03 '16 at 12:57