]> sipb.mit.edu Git - ikiwiki.git/blob - doc/forum/understanding_filter_hooks.mdwn
split out the toplevel discussion page into individual forum posts
[ikiwiki.git] / doc / forum / understanding_filter_hooks.mdwn
1 Hi All;
2
3 I'm trying to use a filter hook as part of making [[wikilinks|ikiwiki/wikilink]] work in [[plugins/contrib/tex4ht]].
4 It seems that filter is called for every page. For my application I just want it to be called for ".tex" files, 
5 but right now I have to have a look at the content, which I don't like so much.
6
7 Is there a better hook to use for this? I need to transform the input before preprocessing.
8
9 [[DavidBremner]] 
10
11 >You can check the type of the page without having to look at the content of the page:
12
13     my $page_file=$pagesources{$page};
14     my $page_type=pagetype($page_file);
15
16 >Then you can check whether `$page_type` is "tex".
17 >--[[KathrynAndersen]]