From: Chris W. <ch...@cw...> - 2003-05-04 18:29:22
|
Steve Sapovits wrote: > Here's a simple one right from the tt2 examples directory: > > [% buttons = [ > { link => 'buttons.html', text => 'Buttons' } > { link => 'menus.html', text => 'Menus' } > { link => 'tabs.html', text => 'Tabs' } > ] > %] > > [% PROCESS splash/menu %] > > Basically they're (I think) a lot like OI widgets. They package > up a look/feel and wrapper around specific page elements. I haven't > done a lot with them. I think OI may override the expected TT > load paths, so I started by symlinking them to the OI doc root for > starters. There's a way to add TT configuration information programmatically -- you can define a custom initialization class to modify the configuration before it's passed to TT: [template_info] ... custom_init_class = My::CustomTTClass custom_init_method = process_config then you should be able to do something like this (untested): package My::CustomTTClass; sub process_config { my ( $class, $tt_config ) = @_; my $splash_dir = '/usr/local/tt/splash'; my $existing_path = $tt_config->{INCLUDE_PATH}; if ( ref $existing_path eq 'ARRAY' ) { push @{ $existing_path }, $splash_dir; } elsif ( $existing_path ) { $existing_path .= ":$splash_dir"; } else { $existing_path = $splash_dir; } $tt_config->{INCLUDE_PATH} = $existing_path; } > I got partial results -- missing images. Maybe the > INCLUDE/PROCESS overrides OI has are getting in the way? Are the URLs generated by splash looking for images under a particular path? Maybe you need to copy the splash images under your site's 'images/' directory, or add an Apache alias: Alias /images/splash /usr/local/tt/splash/images Good luck! Chris -- Chris Winters (ch...@cw...) Building enterprise-capable snack solutions since 1988. |