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)
calling iwregen and iwgen from .tpl file
kellyrmilligan
I have searched the forum for a code snippet of this , and was hoping someone could just post it. I want to regenerate certain files everytime a new file is created. can someone post a snipped that calls iwregen inside of <iwperl> tags to be used in a presentation template?
Thanks,
Kelly
Find more posts tagged with
Comments
mogoo
$cmdregen = `$cltpath/iwregen $file`;
where $cltpath is "YOUR_IW-HOME/bin" and $file is "/default/main.....file.html"
-maureen
ldap_fail.png
kellyrmilligan
thanks maureen!
kellyrmilligan
that worked great, but after testing, I realized that this is not achieving what I wanted to do. maybe you would know this as well. I was calling iwregen at the end of an article template, and wanted to regenerate the index page that has the links to these articles. but I get everything but the title in the link on the index page. I was reading through the generated html article file to get this article title, but I think I need to get everything from the dcrs, is this possible? I just want to make it so that the user doesn't have to create links to the articles.
Thanks ,
Kelly
mogoo
gotcha... I would put logic in the tpl of your index page that searches through all of the article DCRs and pulls the title field from each.
maureen
RobertPisor
We also have a process that builds an index page when another article is published and used to do something very similiar to what Maureen described. {Note: we are still using TS 5.0.1 - the 5.5 upgrade is almost complete though}
That process worked very well for small bits of content. However, some of our DCRs were large (~300 - 500KB) and parsing them took a lot of time. Therefore, we wrote the fields we needed in the index page to exended attributes and read the EAs instead of parsing DCRs.
I don't remember what the break-even point was on our server anymore. If speed is a concern, you might want to do some benchmarking.
Robert