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)
extended attributes while generating the new page
amar_maheshwary
Hi Guys,
I am creating a press release template. I am doing this in the following manner
1. Open the new DCR
2. Fill up the data
3. Generate the new press page
4. While generating it will genrarate the press directory page
5. And Index page of site with updated press column
To do step 4 & 5 I am calling iwpt_compile in the press release tpl file but when it tries to generate press directory/index page the current page's extended attributes are not set still and so its not able to get the extended attributes of the current page and fails. When I try to regenerate the same page it works fine but I want this to work somehow in the first time only. Any ideas how can we get the extended attributes of the new page while generating the page itself ?
If we know when the extended attributes are going to set then after tht I try to regenerate the page then it may help.
Note: I dont want to use DCRs to get the extended attributes info
Any ideas will be definitely helpful
Regards
-Amar
Find more posts tagged with
Comments
Adam Stoller
iwgen and iwregen automatically set TeamSite/Templating/* EAs
iwpt_compile.ipl does not set EAs
Neither, as far as I know, intrinsically transfer other EAs (e.g. metadata) from the DCR to the generated page -- that would have to be done via scripting (either in the PT or in some script that surrounds the page generation process).
If I'm misunderstanding your problem - try to elaborate a bit more - perhaps using before/after examples.
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com
amar_maheshwary
Thanks fish for your reply. I am trying to elaborate this to make it more clear
Imp part of press.tpl is below :
<?xml version="1.0" encoding="UTF-8"?>
<iw_pt name="Article">
<iw_perl>
<![CDATA[
use TeamSite::Config;
my $IWHOME = TeamSite::Config::iwgethome();
my $dcr = iwpt_get_flag_param('-iw_pt-dcr');
my $branch_path = iwpt_get_flag_param('-iw_include-location');
my $press_rel_pt=$branch_path . '\templatedata\news\articles\presentation\press_release.tpl';
my $press_rel=$branch_path . '\content\news\press_releases.jsp';
]]>
</iw_perl>
<b><h4><iw_value name='dcr.articles.headline'/></h4></b>
<!-- Date -->
<P> <B><iw_value name='dcr.articles@publish_date'/></B></P>
<br/><br/>
<iw_iterate list='dcr.articles.story' var='story'>
<iw_iterate list='story' var='para_value'>
<p><iw_value name='para_value.p'/></p>
</iw_iterate>
</iw_iterate>
<iw_perl>
<![CDATA[
$cmd="$IWHOME\\bin\\iwpt_compile.ipl -pt $press_rel_pt -iw_pt-dcr $dcr -ofile $press_rel";
my $out = qx($cmd);
]]>
</iw_perl>
</iw_pt>
Here when I try to generate page using press.tpl say press1.jsp then this page is going to be used by press_release.tpl to regenerate the press_release.jsp page containing all the press releases with their headlines. And the page1.jsp being new page its headline should be on top.
But for a new page(press1.jsp) extended attributes are still not set and when press_release.tpl tries to find out the extended attributes of press1.jsp then it fails to do so and fails to include the press1.jsp page headline to press_release.jsp page.
I want EAs should be created before iwpt_compile command runs or iwpt_compile should wait for this
let me know if still something unclear to you