Skip Navigation

[Closed] View Shortcode destroys Website Layout

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

This topic contains 3 replies, has 2 voices.

Last updated by Nigel 1 year, 11 months ago.

Author
Posts
#2514555
Bug1.jpg
Bug2.jpg

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?

#2514611

If I insert the view shortcode [wpv-view name="startseite-aktuelles"] the height of the section is to big.

#2514705

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?

#2515299

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.

The topic ‘[Closed] View Shortcode destroys Website Layout’ is closed to new replies.