I am trying to insert a View into a page
Link to a page where the issue can be seen:
hidden link
hidden link
I expected to see: The View inside of the blue Banner under the title "Aktuelles"
Instead, I got: Blue sections I don't wanna have. Why is it like that?
If I insert the view shortcode [wpv-view name="startseite-aktuelles"] the height of the section is to big.
Ich habe in den Loop nun noch zwei zusätzliche schließende Div's hinzugefügt:
[wpv-layout-start]
[wpv-items-found]
<!-- wpv-loop-start -->
<wpv-loop wrap="1" pad="true">
<div class="container wpv-loop js-wpv-loop">
[wpv-item index=1]
<div class="row ">
<div class="col-md-12 borderbottom">[wpv-post-body view_template="loop-item-in-alles-aktuelles"]</div>
</div>
[wpv-item index=other]
<div class="col-md-12 borderbottom">[wpv-post-body view_template="loop-item-in-alles-aktuelles"]</div>
[wpv-item index=pad]
<div class="col-md-12"></div>
[wpv-item index=pad-last]
<div class="col-md-12"></div>
</div>
</wpv-loop>
</div>
<!-- wpv-loop-end -->
[/wpv-items-found]
[wpv-no-items-found]
[wpml-string context="wpv-views"]No items found[/wpml-string]
[/wpv-no-items-found]
[wpv-layout-end]
<br>
<div class="modifiepagination">[wpv-pagination][wpv-pager-nav-links output="bootstrap" previous_next_links="true" ellipsis="..." text_for_previous_link="❮" text_for_next_link="❯"][/wpv-pagination]</div>
</div></div>
So funktioniert die Ansicht nun. Hier das Loop Item:
[wpv-post-date format="d.m.Y"]<br>
<h3 class="modifiedtitel">[types field="aktuelles-titel"][/types]</h3>
[trimfield length="30" more=" Read more..." field="aktuelles-inhalte" postid="[wpv-post-id]"][/trimfield]
Ob das allerdings richtig ist? Ich weiss es nicht. Für mich ergibt es keinen Sinn.
An was liegt das?
Nigel
Supporter
Languages:
English (English )
Spanish (Español )
Timezone:
Europe/London (GMT+00:00)
Hi there
I reformatted your sample code and removed the no-items-found and pagination sections to simplify what we are looking at:
[wpv-layout-start]
[wpv-items-found]
<!-- wpv-loop-start -->
<wpv-loop wrap="1" pad="true">
<div class="container wpv-loop js-wpv-loop">
[wpv-item index=1]
<div class="row ">
<div class="col-md-12 borderbottom">[wpv-post-body view_template="loop-item-in-alles-aktuelles"]</div>
</div>
[wpv-item index=other]
<div class="col-md-12 borderbottom">[wpv-post-body view_template="loop-item-in-alles-aktuelles"]</div>
[wpv-item index=pad]
<div class="col-md-12"></div>
[wpv-item index=pad-last]
<div class="col-md-12"></div>
</div>
</wpv-loop>
</div>
<!-- wpv-loop-end -->
[/wpv-items-found]
[wpv-layout-end]
<br>
</div></div>
I see 3 extra closing /div tags that don't have a corresponding opening div tag (one after the /wpv-loop tag and 2 at the end).
If you need those for the layout not to break then I suspect what is happening is that your linked template (loop-item-in-alles-aktuelles) is missing at least one closing div, which obliges you to close them in your loop editor code.