Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2005-10-28 08:32:30

zem
Developer Emeritus
From: Melbourne, Australia
Registered: 2004-04-08
Posts: 2,579

[howto] A list of tags

Here’s a list of Textpattern tags and attributes, automatically generated from the 4.0.x source around rev 1066:

http://thresholdstate.com/download/tags-4.0.2.txt

It’s not entirely complete. Missing are: pseudo tags like <txp:s /> and <txp:link />, anything that’s not in taghandlers.php, and any taghandler functions that don’t use the standard $atts/$thing parameters. Attributes are shown only if the function uses lAtts() to extract them.

The script that generates this list is here:

http://thresholdstate.com/download/tagdoc.php

Run it at the command line with the full path to taghandlers.php, something like this:

$ php tagdoc.php 4.0/textpattern/publish/taghandlers.php > tags.txt

Perhaps someone can improve on it, reformat the output etc.

Last edited by zem (2005-10-30 22:11:48)


Alex

Offline

#2 2005-10-30 00:51:16

zem
Developer Emeritus
From: Melbourne, Australia
Registered: 2004-04-08
Posts: 2,579

Re: [howto] A list of tags

For convenience, here’s the list:

<txp:page_title />
<txp:css />
<txp:image />
	id
	name
	style
	align
<txp:thumbnail />
	id
	name
	thumbnail
	poplink
	style
<txp:output_form />
<txp:feed_link />
	label
	break = br
	wraptag
	category
	section
	limit
	flavor = rss
	title = gTxt('xml_feed_title')
<txp:link_feed_link />
	label
	break = br
	wraptag
	category
	flavor = rss
	title = gTxt('xml_feed_title')
<txp:linklist />
	form = plainlinks
	sort = linksort
	label
	break
	limit
	wraptag
	category
	class = linklist
	labeltag
<txp:email />
	email
	linktext = gTxt('contact')
<txp:password_protect />
	login
<txp:recent_articles />
	label
	break = br
	wraptag
	limit = 10
	category
	sortby = Posted
	sortdir = desc
	class = recent_articles
	labeltag
<txp:recent_comments />
	label
	break = br
	wraptag
	limit = 10
	class = recent_comments
<txp:related_articles />
	label
	break = br
	wraptag
	limit = 10
	class = related_articles
	labeltag
<txp:popup />
	label
	wraptag
<txp:category_list />
	label
	break = br
	wraptag
	parent
	type = article
	class = category_list
	labeltag
<txp:section_list />
	label
	break = br
	wraptag
	class = section_list
	labeltag
	include_default
<txp:search_input />
	form = search_input
	wraptag = p
	size = 15
	label = Search
	button
	section
<txp:link_to_next> ... </txp:link_to_next>
	showalways
<txp:link_to_prev> ... </txp:link_to_prev>
	showalways
<txp:link_to_home> ... </txp:link_to_home>
<txp:text />
<txp:posted />
	format
<txp:comments_count />
<txp:comments_invite />
	class = comments_invite
	showcount = true
	textonly = false
	showalways = false
	//FIXME in crockery. This is only for BC.
			'wraptag
<txp:comments_form />
	id = @$pretext['id']
	class = comments_form
	preview = false
	form = comment_form
<txp:comments_annotateinvite> ... </txp:comments_annotateinvite>
	id = @$pretext['id']
	class = comments_annotateinvite
	wraptag = h3
<txp:comments />
	id = @$pretext['id']
	form = comments
	wraptag = ($comments_are_ol ? 'ol' : '')
	break = ($comments_are_ol ? 'li' : 'div')
	class = comments
	breakclass
<txp:if_comments_preview> ... </txp:if_comments_preview>
<txp:comment_permlink> ... </txp:comment_permlink>
	anchor = empty($thiscomment['has_anchor_tag'])
<txp:comment_id />
<txp:comment_name />
<txp:comment_email />
<txp:comment_web />
<txp:comment_time />
<txp:comment_message />
<txp:comment_anchor />
<txp:message />
<txp:author />
<txp:body />
<txp:title />
<txp:excerpt />
<txp:category1 />
	link
	title
<txp:category2 />
	link
	title
<txp:category />
	link
	title
	name
	wraptag
	section = @$pretext['s']
<txp:section />
	link
	title
	name
	wraptag
<txp:keywords />
<txp:article_image />
	style
<txp:search_result_title />
<txp:search_result_excerpt />
	hilight = strong
<txp:search_result_url />
<txp:search_result_date />
<txp:search_result_count />
	text = ($t == 1 ? gTxt('article_found') : gTxt('articles_found'))
<txp:image_index />
	label
	break = br
	wraptag
	parent
	type = article
	class = image_index
	labeltag
<txp:image_display />
<txp:if_comments> ... </txp:if_comments>
<txp:if_comments_allowed> ... </txp:if_comments_allowed>
<txp:if_comments_disallowed> ... </txp:if_comments_disallowed>
<txp:if_individual_article> ... </txp:if_individual_article>
<txp:if_article_list> ... </txp:if_article_list>
<txp:permlink> ... </txp:permlink>
	style
<txp:lang />
<txp:breadcrumb />
	wraptag = p
	sep = &#160;&#187;&#160;
	link = y
	label = $sitename
	title
	class
	linkclass = noline
<txp:if_excerpt> ... </txp:if_excerpt>
<txp:if_search> ... </txp:if_search>
<txp:if_category> ... </txp:if_category>
	name
<txp:if_article_category> ... </txp:if_article_category>
	name
	number
<txp:if_section> ... </txp:if_section>
	name
<txp:if_article_section> ... </txp:if_article_section>
	name
<txp:php> ... </txp:php>
<txp:custom_field />
	name = @$prefs['custom_1_set']
<txp:if_custom_field> ... </txp:if_custom_field>
	name = @$prefs['custom_1_set']
	val = NULL
<txp:site_url />
<txp:img />
	src
<txp:error_message />
<txp:error_status />
<txp:if_status> ... </txp:if_status>
	status = 200
<txp:page_url />
	type = request_uri
<txp:if_different> ... </txp:if_different>
<txp:if_first_article> ... </txp:if_first_article>
<txp:if_last_article> ... </txp:if_last_article>
<txp:file_download_list />
	form = files
	sort = filename
	label
	break = br
	limit = 10
	wraptag
	category
	class = file_download_list
	labeltag
<txp:file_download />
	form = files
	id
	filename
<txp:file_download_link> ... </txp:file_download_link>
	id
	filename
<txp:file_download_size />
	decimals = 2
<txp:file_download_created />
<txp:file_download_modified />
<txp:file_download_id />
<txp:file_download_name />
<txp:file_download_category />
<txp:file_download_downloads />
<txp:file_download_description />

Alex

Offline

#3 2005-11-07 20:53:41

Andrew
Plugin Author
Registered: 2004-02-23
Posts: 730

Re: [howto] A list of tags

just stumbled across this thread – nice one, zem. thanks.

Offline

#4 2005-11-16 05:08:37

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

Re: [howto] A list of tags

<txp:search_input />
form = search_input

I cannot find any information about a search_input form. Even, I dont have any search_input form installed by default in 4.0.2.

Will this be in a future release or is for some backward-compatibility?
How is it supposed to be used?


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#5 2005-11-16 05:13:28

Andrew
Plugin Author
Registered: 2004-02-23
Posts: 730

Re: [howto] A list of tags

There are a few existing discussions scattered around. From those results, Dean’s reply.

Offline

#6 2005-11-16 20:39:31

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

Re: [howto] A list of tags

Thanks, Andrew.

I have found that the “form” attribute works. (I didnt understand in your answer if you were saying it works or not).

How to use it?

Simple, add the form=“mysearchform” to the txp:search_input.

Then, create the form “mysearchform” and hardcode you form. A simple form like this one should work:
<code>
<form action=”<txp:site_url />” method=“get”>
<p><label>Search: <input name=“q” value=”“ size=“15” type=“text”></label></p></form>
</code>

That’s all.


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#7 2008-04-29 06:11:47

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

Re: [howto] A list of tags

Sorry for the bump.

I just found it funny to be looking for an answer and then find myself replying me… for the second time! (If we consider that I asked a question and then I also replied it to me…).


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#8 2008-04-29 17:13:33

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: [howto] A list of tags

Next time just search for your own posts ;) But thanks for bumping, I didn’t know about the form attribute for search_input.

Offline

#9 2008-04-29 17:40:25

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

Re: [howto] A list of tags

Hi Els!

Now you don’t know that you did know about it.

I’m still thinking why anyone would want to use <txp:search_input /> with the form attr to call a hardcoded <form>.
If it is about re-using it on many templates, a simple <txp:output_form form="" /> calling the hard-coded form would do the job.


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#10 2008-04-29 19:35:44

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: [howto] A list of tags

maniqui wrote:

Now you don’t know that you did know about it.

LOL! I wonder how many other things I know without knowing…

I’m still thinking why anyone would want to use <txp:search_input /> with the form attr to call a hardcoded <form>.
If it is about re-using it on many templates, a simple <txp:output_form form="" /> calling the hard-coded form would do the job.

Well, maybe you can use the other attributes even when using a hardcoded form? Though I haven’t tried that, I’m using output_form. It’s even one keystroke shorter ;)

Offline

#11 2009-09-17 01:42:12

masa
Member
From: Asturias, Spain
Registered: 2005-11-25
Posts: 1,091

Re: [howto] A list of tags

Has anyone used Zem’s script recently?

In the output it produces, several tags are missing, namely txp:article, txp:article_custom but also less used ones such as txp:site_url

It would be a great help in compiling a tag library.

Offline

#12 2009-09-17 01:52:16

jsoo
Plugin Author
From: NC, USA
Registered: 2004-11-15
Posts: 1,793
Website

Re: [howto] A list of tags

article and article_custom are in publish.php. site_url takes no attributes, unlike most Txp tags, and hence is missed by zem’s script.


Code is topiary

Offline

Board footer

Powered by FluxBB