Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2010-09-27 20:34:53

johnstephens
Plugin Author
From: Woodbridge, VA
Registered: 2008-06-01
Posts: 999
Website

Comment markup on Textpattern.com

Glancing at the markup at Textpattern.com, I saw this:

<div class="commentBody"> 
<a id="c001566"></a>
...
</div> <!--close commentBody -->

I understand what the empty anchor element is for, but wouldn’t it be better to do it like this?

<div class="commentBody" id="c001566">
...
</div> <!--close commentBody -->

It could be achieved thusly:

<div class="commentBody id="c<txp:comment_id />">
...
</div> <!--close commentBody -->

Offline

#2 2010-09-27 20:48:48

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: Comment markup on Textpattern.com

Good catch John. I’ll look into that. :)

Update – Done thank you. Actually that anchor is created by a Txp tag – <txp:comment_anchor />.

Last edited by thebombsite (2010-09-27 20:54:01)


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#3 2010-09-27 20:59:44

johnstephens
Plugin Author
From: Woodbridge, VA
Registered: 2008-06-01
Posts: 999
Website

Re: Comment markup on Textpattern.com

Cool!

I don’t know if this matters, but the same design pattern is found in the comment preview form:

<div class="commentBody"> 
<a id="c0"></a> 
	<p>Velisim tatiniat modipsustie lectus ros, cipsusto velesto doloreet augiat porta ipit euissim eraestrud molor.</p> 


</div> <!--close commentBody -->

Offline

#4 2010-09-27 22:11:04

johnstephens
Plugin Author
From: Woodbridge, VA
Registered: 2008-06-01
Posts: 999
Website

Re: Comment markup on Textpattern.com

Apropos of that last bit, I also notice that the comment preview system appends #cpreview to the URL, which doesn’t coordinate with the anchor id.

Last edited by johnstephens (2010-09-27 22:11:20)

Offline

#5 2010-09-28 16:46:29

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: Comment markup on Textpattern.com

OK. Done the “id” anchor for the comment preview. The anchor for “cpreview” does exist but it is above the little text message rather than the comment itself.

Last edited by thebombsite (2010-09-28 16:47:09)


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#6 2010-09-28 16:55:06

johnstephens
Plugin Author
From: Woodbridge, VA
Registered: 2008-06-01
Posts: 999
Website

Re: Comment markup on Textpattern.com

Great! I didn’t notice the #cpreview id, but it makes much better sense where it is.

Offline

Board footer

Powered by FluxBB