Content last modified Monday 3 September 2018
hop to #bottom
About It:
Get it:
Rate it:
  • Helpful?
  • 0 Yes
  • 1 No
Flag it:

If you'd like to provide updated information and do not have access to directly edit, please contact the site admin; thanks!


Saw Dunstan Orchard’s article about tag redefinition and thought that this could / would be an useful plugin.

No documentation site or anything like that yet as I am still building my website. One will pop up in time.

I would like to point out that all credit for this belongs to Dunstan. I basically made some minor alterations and packaged his code. Although, find bugs, please report them to me instead and not him.


Provides one tag
<txp:ptv_code_insert> </txp:ptv_code_insert>


  • filename – Name of file to display. This file should ALWAYS have the ending .txt which must be omitted from the filename attribute.
  • download – Include a download link? (0 | 1). 1 is default

Tag content

  • Tag content should contain path to file. Absolute according to webserver root or relative from current path.
  • Tag can also be self enclosing in which case it is assumed that the code document resides in current folder.

<txp:ptv_code_insert filename="ptv_code_transform.php">/code</txp:ptv_code_insert>

(Will display the file ptv_code_transform.php.txt in the directory

<txp:ptv_code_insert filename="ptv_code_transform.php">../code</txp:ptv_code_insert>

(Will display the file ptv_code_transform.php.txt in parent directory)

<txp:ptv_code_insert filename="ptv_code_transform.php" download="0" />

(Will display the file ptv_code_transform.php.txt in current directory)

Example CSS in the plugin.

Article Request Count:

Archived [?]: orphaned: broken links

Initially released:
Posted here:
24 Mar 2005

You know you want to visit the Archives.
Published with Textpattern