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)
setting meta data on pt
madmax
hi everybody ,
i am tring to set metadata on pt. i code -----
<iw_perl><![CDATA[
use TeamSite::Config;
### Set the extended attributes ###
my $OFile = iwpt_get_ofile_name();
$OFile =~s#\\#/#g;
open(MYFILE, ">$OFile"); #We have to create our output file before setting the attributes
close(MYFILE);
my $IWHome = TeamSite::Config::iwgethome();
$IWHome =~s#\\#/#g;
my $IWExtAttr = "$IWHome/bin/iwextattr.exe";
my $SetAuthor = "$IWExtAttr -s \"News Author\"=\"". iwpt_dcr_value('dcr.newsAuthor') ."\" $OFile";
my $SetPubDate= "$IWExtAttr -s \"Published Date\"=\"". iwpt_dcr_value('dcr.newsPubdate') ."\" $OFile";
system($SetAuthor);
system($SetPubDate);
]]></iw_perl>
but still it's not setting any metadata any advise.
teamsite 6.5
win 2003
Find more posts tagged with
Comments
iwovGraduate
You get any errors ?
You might want to try debugging it by checking what the exact command is and trying to capture (and print) the output when executed.
What is the value of $SetAuthor and $SetPubDate just prior it is executed ? What happens if you run the same exact command from a shell/commandline ?
Edited by iwovGraduate on 04/21/05 07:22 AM (server time).
madmax
hi everybody,
my $OFile = iwpt_get_ofile_name();
print "o-file $OFile\n";
here is the problem i am not getting any file name.
any advice
Adam Stoller
Are you getting "o-file" or are you getting nothing?
If you're getting nothing - try changing it to iwpt_output("o-file $OFile<br>\n");
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com
madmax
thanks ghoti it's working.
now i am tring to set metadate on title and teaser text but both of them are using visual format. as a result i am getting
<p class="MsoBodyText">hallo</p>
<p class="MsoCaption">hallo</p>
<address class="MsoCaption">hallo</address>
<address class="MsoCaption"><font face="Courier New, Courier">hallo</font></address>
<address class="MsoCaption"><font face="Courier New" size="7">hallo</font></address>
now i am thinking of using s///g;
any suggestions and tips?
CrosstabCubeBuilder.JPG
LooseCannon
I suggest you turn VF off and handle any formatting in the PT
Adam Stoller
I don't understand what you're asking.
What does the data source (DCR) look like?
What are the current results?
What are the desired results?
What does your PT code look like?
The clearer and more detailed you are with the information - the better chance you have of someone being able to assist you.
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com
madmax
ok .
my dct it has title field and it's visual format text area. so the user input any title and then they can modify the color , font and apply any style in the dct title field. when i generate html page for that dct through my presentaion template then on the generated html page-properties the title was set as metadata.
but since the user use visual format for formating the title so it was set <p class=MsoBodyText>hallo <p class=MsoCaption> in my metadata properties. but that's not desirable i want my title without any style just as simple text such as for this example it'll be only hallo.
any advice?
Adam Stoller
You're still not making sense [to me].
You have a title field in your DCT - okay
The title field in your DCT is using VFE and allows users to set colors, fonts, etc. - okay (perhaps)?
You want the title to be unformatted in the generated page (or at least not abritrarily formatted) - yes?
-- First simple question: If you don't want arbitrary formatting - why are you using a VFE textarea for the title field in the DCT instead of using a simple text field?
You also say "title was set as metadata" -- are you talking about TeamSite Extended Attributes being applied on the file within TeamSite? Or are you talking about the 'class="..."' attribute being applied to the <p> tags in the VFE textarea ?
-- Again, if you don't want this arbitrary formatting surrounding your title data - then use a simple text field instead of a VFE textarea.
-- If you must use a VFE textarea [why?] then you need to spend some time reading through the Extron / VFE manuals so that you can understand how to configure the textarea and the way it formats the data within it.
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com
madmax
thanks ghoti,
i'll probably take out the vfe field and use simple text field.