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)
template meta tags
Markandeyulu
I have template built and i want to have text items, 1) author 2) start date 3) end date 4) description 5) key words. and then i want those to be set as metadata while generating the html page...
What do i need to do to accomplish that to set the meta data that i need to get set metadata when i go to file properties...
Find more posts tagged with
Comments
Migrateduser
If I understand correctly, you want to take a value that someone entered within a DCT and set it as metadata on the output file? You would have do something like the following within the TPL:
This is pretty much pseudo code, so you will have to expand on it.
1. get the location of the output file
my $outputfile = iwpt_get_ofile_name();
I think this returns the file system path to the file, such as:
/iwmnt/default/main/WORKAREA/draft/myfile.html (or maybe the "CGI" path: /.iwmnt/default...)
You should convert this to a vpath such as:
/default/main/WORKAREA/draft/myfile.html
2. touch the file if it does not already exist.
3. Grab values from the DCR
my $title = iwpt_dcr_value('dcr.title');
4. Run iwexattr to set the metadata value on the output file
my $cmd="IWHOME/bin/iwexattr -s TeamSite/Metadata/title=$title $outputfile"
`$cmd`;
I should also note that all of this would be within a <iw_perl> tag.
--
Jed Michnowicz
Interwoven Technical Consultant