Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
calling iw_include from perl module
Zisyfos
Hi,
I'm trying to call iw_include from a perl module. I have tried to call TeamSite:
T::iw_include::file_include(...), but I suppose this won't be enough. Have anyone done something similar? Is there another way to do it?
Regards
/Klas
Find more posts tagged with
Comments
Adam Stoller
Just to make sure we have full context here (I'm not sure of the answer):
1) What version of TS/TST are you using?
2) What platform? (shouldn't make a difference, but just in case)
3) Is the module you're referring to being used from within a PT or are you trying to write code that's being called by something other than a PT? (I'd think only the former would be supported)
4) Perhaps you can post the [presumably] "parent" PT, the module, and the to-be-included PT?
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com
Zisyfos
Hi.
Thanks for your prompt reply.
1,2. I'm using Teamsite 5.5.2 on AIX
3. It is used from within a perl template
4. I am not sure if I can post the whole templates, so I will post the important parts instead:
The parent PT:
<my_perl_module link="the_link" pt="../../../include/general_link.tpl/>
"my_perl_module" (I've also tried the commented code):
my $node = $this->get_attrib('link', 'perl_name');
#$this->set_attrib('mode','ptlocal');
#$this->set_attrib('pt','../../../include/general_link.tpl');
#TeamSite:
T::iw_include::end($this);
Teamsite:
T::iw_include:
t_include($this, $iw_parser, 'ptlocal', $this->get_attrib('pt'), '', '', '');
Maybe you are wondering why I want to do this instead of just using the ordinary <iw_include> tag. That is because I need to submit a node by reference each time, and therefore I currently have a perl code block before each <iw_include>, which pollutes the code and makes it less maintainable.
If you still want more information, I'll see if I can supply it for you...
Regards
/Klas
Adam Stoller
I'm not sure I understand what you're trying to do (or why) - but I'll leave it up to someone else to ask for more information... good luck.
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com