wiki:IncludeMacro

Version 3 (modified by Noah Kantrowitz, 13 years ago) (diff)

Add permissions notice

Include external resources in a wiki page.

Description

This macro lets you include things into wiki pages.

Currently supported sources are:

  • HTTP - http:
  • FTP - ftp:
  • Wiki pages - wiki:
  • Repository files - source:

An optional second argument lets you force the output MIME type to something specific, but most things should have sane defaults.

For URL includes (HTTP and FTP) you need the permission INCLUDE_URL. For other internal resources you need the normal Trac permission to access it.

Bugs/Feature Requests

Existing bugs and feature requests for IncludeMacro are here.

If you have any issues, create a new ticket.

Download

Download the zipped source from [download:includemacro here].

Source

You can check out IncludeMacro from here using Subversion, or browse the source with Trac.

Example

Include Google on a page:

[[Include(http://www.google.com)]]

Include a wiki-formatted file from the repository:

[[Include(source:trunk/my_file.txt, text/x-trac-wiki)]]

Recent Changes

17709 by ttressieres on 2020-04-29 19:50:27
include a section of source file, accept 3 named parameters "start", "end", "lineno" (close #12729)
17698 by rjollos on 2020-04-24 18:27:36
TracIncludeMacro 3.2.0dev: Remove Trac 0.11 compatibility code

The macro supports Trac >= 1.0.

Refs #12729.

17157 by rjollos on 2018-04-25 00:13:15
TracIncludeMacro 3.2.0dev: Fix regression in r15552

The regression prevented specifying the mimetype
when rendering a file from the repository.

Closes #4004, Refs #12778.

(more)

Author/Contributors

Author: coderanger
Contributors: