Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2023-05-15 10:18:47

Gallex
Member
Registered: 2006-10-08
Posts: 1,308

Duplicated content

obviously something very simple, but i can’t figure out myself, why it duplicates the content here

page:

<txp:if_section name="blogi">
<section class="content-2">
<div class="container">
<txp:article form="blogi" />
</div>
</section>

form blogi:

<txp:if_individual_article>
<div class="title nowrap">
<h1><txp:section title="1" /> / <span><txp:title /></span></h1>
</div>
<div class="body">
<txp:body />
<h6><txp:posted format="%d.%m.%Y" /></h6>
</div>
<div class="title nowrap">
<h1><txp:section title="1" /> / <span><txp:title /></span></h1>
</div>
<txp:else />

<div class="title">
<h2><txp:section title="1" /></h2>
</div>

<div class="body">
<txp:article frontpage="0" limit="6" sort="Posted desc" wraptag="div" break="div" class="col-content">

<div class="tulbad-2">
<div><div class="article-img"><txp:permlink><txp:article_image /></txp:permlink></div></div>
<div>
<h2><txp:permlink><txp:title /></txp:permlink></h2>
<txp:permlink><txp:rss_auto_excerpt words="20" ending=" [&hellip;]" showlinkwithexcerpt="0" linktext="Loe edasi" linkwraptag="p" linkclass="edasi" body="body" overrideexcerpt="1" showlinkwithbody="0" /></txp:permlink>
<h6><txp:posted format="%d.%m.%Y" /></h6>
</div>
</div>

</txp:article>
</div>
<div class="title">
<h2><txp:section title="1" /></h2>
</div>
</txp:if_individual_article>

Offline

#2 2023-05-15 11:10:54

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,468
Website GitHub

Re: Duplicated content

It’s because your calling the form blogi from a <txp:article> tag and then you have another of those tags inside the form. Remove one of those and it’ll work fine.

If you remove the one in the Page, you could replace it with:

<txp:output_form form="blogi" />

The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#3 2023-05-15 11:42:03

Gallex
Member
Registered: 2006-10-08
Posts: 1,308

Re: Duplicated content

thank’s!

but if i would like to remove this one:

<txp:article frontpage="0" limit="6" sort="Posted desc" wraptag="div" break="div" class="col-content">
...

how it should look like then?

Offline

Board footer

Powered by FluxBB