Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2018-06-13 17:01:32

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 6,618
Website

html notes not parsed through short-tags

I have created a short tag for notes which also appear as tooltips, similar to what wikipedia is doing.

<txp:if_yield name="pos" value="top">
<sup class="tooltip">
<a href="#fn<txp:yield name="no" />" id="foot<txp:yield name="no" />"><txp:yield name="no" /></a>
<!--googleoff: all-->
<span class="tooltiptext noprint">
<txp:variable name='text<txp:yield name="no" />'><txp:yield name="txt" escape="" /></txp:variable>
<txp:yield name="txt" escape="" />
</span>
<!--googleon: all-->
</sup>
</txp:if_yield>

<txp:if_yield name="pos" value="bottom">
<li id="fn<txp:yield name="no" />">
<txp:if_yield name="txt">
<txp:yield name="txt" escape="" />
<txp:else />
<txp:variable name='text<txp:yield name="no" />' />
</txp:if_yield>
<sup>
<a class="noprint" href="#foot<txp:yield name="no" />">&#94;</a>
</sup>
</li>
</txp:if_yield>

The problem is that the html notes disappear from the front end after the short-tag is parsed. I normally would not mind, and I would normally call this a feature, but as this is to prevent google from indexing part of the note, I’m not sure if textpattern is doing this intentionaly… or not.


Yiannis
——————————
neme.org | hblack.net | LABS | State Machines | NeMe @ github

Offline

#2 2018-06-16 05:29:54

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 6,618
Website

Re: html notes not parsed through short-tags

Maybe the above is too complex to test.

A simple way:

<!--googleoff: all--><txp:yield name="txt" /><!--googleon: all-->

does not show the html comments in the source code when used as a short-tag. Is this intentional?


Yiannis
——————————
neme.org | hblack.net | LABS | State Machines | NeMe @ github

Offline

#3 2018-06-16 10:42:49

etc
Developer
Registered: 2010-11-11
Posts: 2,675
Website

Re: html notes not parsed through short-tags

colak wrote #312589:

Maybe the above is too complex to test.

A simple way:

<!--googleoff: all--><txp:yield name="txt" /><!--googleon: all-->...

does not show the html comments in the source code when used as a short-tag. Is this intentional?

Yiannis, everything looks ok in my tests.


etc_[ query | search | pagination | date | tree | cache ]

Offline

#4 2018-06-16 11:34:51

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 6,618
Website

Re: html notes not parsed through short-tags

Hi Oleg,

In my initial example found here, or the simple example that followed <!--googleoff: all--> does not appear in the source code and I can not figure out why. Later I’ll check the online demo to check if there is something specific with my install.


Yiannis
——————————
neme.org | hblack.net | LABS | State Machines | NeMe @ github

Offline

#5 2018-06-16 14:28:01

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 6,618
Website

Re: html notes not parsed through short-tags

You are absolutely right! On the demo site the html comments appear just fine… I’ll have to debug my site to see why they are omitted from the parse.


Yiannis
——————————
neme.org | hblack.net | LABS | State Machines | NeMe @ github

Offline

Board footer

Powered by FluxBB