Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
VBScript in .tpl
manju166
Hi,
I came across this reqt where I have to insert a VBScript in my template,
Is there a special syntax to insert, If any one knows please let me know, if possible with a example
Thankyou
Manju
Find more posts tagged with
Comments
JamJamT
I just put the VBScript in iw_perl tags and used iwpt_output tags to write the code:
<iw_perl>
<![CDATA[
iwpt_output ("<% \n");
iwpt_output ("Dim yourvariable \n");
iwpt_output ("If trim\(Request.QueryString\(\"whatever\"\)\) = \"\" Then \n");
...
iwpt_output ("End If \n");
iwpt_output ("%> \n");
]]>
</iw_perl>
manju166
thanks for your help..
I tried your way but it gives me the following error
iwtmplpreview Error:
XML parse error:
mismatched tag at line 417, column 2, byte 12793 at d:\iw-home\iw-perl\site\lib/XML/Parser.pm line 185
:\default\main\HumanaBranch\CorporateIntranetBranch\WORKAREA\DeveloperWorkarea\templatedata\CorporateIntranet\FeedBack\presentation\FeedBack.tpl
the line 417 has a closing </iw_pt> tag.
Am i missing something or ?? my mistake
mogoo
FYI, I usually get THAT kind of error with a missing/extra opening or closing CDATA tag somewhere in the tpl...
JamJamT
I agree with Mogoo, it appears that you're missing a closing/opening tag.
To verify this, save your TPL to your desktop (or wherever it's easy to find) as filename.xml
Then open it with Internet Explorer. That should better indicate where your missing tag is.
manju166
I appreciate your help.
I got rid of the previous error and the xml example works and thats how i found my mistake.
I came across this error
while preview
iwtmplpreview Error:
Could not process template: Y:\default\main\HumanaBranch\CorporateIntranetBranch\WORKAREA\DeveloperWorkarea\templatedata\CorporateIntranet\FeedBack\presentation\FeedBack.tpl
:\default\main\HumanaBranch\CorporateIntranetBranch\WORKAREA\DeveloperWorkarea\templatedata\CorporateIntranet\FeedBack\presentation\FeedBack.tpl
and
while generating
iwtmplhtmlwizard Error:
Could not process template: Y:\default\main\HumanaBranch\CorporateIntranetBranch\WORKAREA\DeveloperWorkarea\templatedata\CorporateIntranet\FeedBack\presentation\FeedBack.tpl
:\default\main\HumanaBranch\CorporateIntranetBranch\WORKAREA\DeveloperWorkarea\templatedata\CorporateIntranet\FeedBack\presentation\FeedBack.tpl
anybody have any idea why this error shows up, I am trying to insert vbscript in my .tpl
I searched the forums for the error but couldnt find anything
please help !!
anilp
to insert vbscript, you can use the cscript tag available in the PT tag library. for more info, go to support site at
https://support.interwoven.com/library/devel/tst/pt/5_01/TeamSite__PT__iw_cscript.html
Migrateduser
I would seriously suggest that you try running your template through the template compiler (iwpt_compile.ipl) rather than attempting to debug it through the TeamSite templating gui. The templating compiler will give you much better information and will also allow you to convert your sample dcr and presentation template into a perl script that you can run through standard perl debugging tools. More info about the compiler can be found here: