Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
[SOLVED] content appears twice
What am I doing wrong here? I have all the authors in the links which I parse in a custom field in the write tab. the problem is that if their name is not linked it appears twice on the page.
Sample of the bug in the code can be seen on the right side-bar.
<div class="grid_6" id="side" role="complementary">
<div itemscope itemtype="http://schema.org/Person" id="meta">
<p class="linklist">Text by <txp:linklist id='<txp:custom_field name="venue" escape="" />' break=" & " wraptag="">
<txp:variable name="linkurl" value='<txp:link_url />' />
<txp:if_variable name="linkurl" value="">
<span itemscope itemtype="http://schema.org/Text"><span itemprop="author"><txp:link_name /></span></span><span itemprop="author"><txp:link_name /></span></span>
<txp:else />
<a rel="author external" href="<txp:link_url />"><txp:link_name /></a>
</txp:if_variable>
</txp:linklist></p>
<time class="published" datetime="<txp:posted format="%Y-%m-%dT%T" />">
Posted: <txp:posted format="%b %d, %Y" /></time>
</div>
Solved! Posing here is enough for bugs to be found.
Last edited by colak (2017-11-26 10:01:09)
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: [SOLVED] content appears twice
Hi Yiannis, I think it’s just a copy-paste error. You simply have the code in there twice:
...
<span itemscope itemtype="http://schema.org/Text">
<span itemprop="author"><txp:link_name /></span>
</span>
<span itemprop="author"><txp:link_name /></span>
</span>
...
(I just added enters to make it easier to see)
TXP Builders – finely-crafted code, design and txp
Offline
Re: [SOLVED] content appears twice
jakob wrote #307999:
Hi Yiannis, I think it’s just a copy-paste error. You simply have the code in there twice:
...
(I just added enters to make it easier to see)
Indeed I found it as you were typing:)
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: [SOLVED] content appears twice
Yep, it’s working now ;-)
TXP Builders – finely-crafted code, design and txp
Offline
Re: [SOLVED] content appears twice
the forum always does it for me. I guess it has the same effect as looking at a design sideways. You get a view which is unfamiliar to you and all the mistakes show up.
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: [SOLVED] content appears twice
colak wrote #308002:
the forum always does it for me. I guess it has the same effect as looking at a design sideways. You get a view which is unfamiliar to you and all the mistakes show up.
See also rubber duck debugging — it works for me a lot. I have an actual rubber duck on my desk, too…
Offline
Pages: 1