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)
preprocessor to write fields from dcr to EA
kellyrmilligan
Hello,
we have some fields in our DCR's that are also going to be used as metadata, for example, title. We did start out using formapi and a cgi script to do this, but would like to run it through a preprocessor in Metatagger instead. Has anyone done this?
MT 4.0.1
TS 6.5
Thanks
Kelly
Find more posts tagged with
Comments
kellyrmilligan
There is definitely a lack of code sharing going on in this forum, so in the hopes that this will inspire others, I have posted the code that solves my own problem, attached to this post. This code first reads standard in into a variable, gets the original path, and then based on the original path applies different fields in the dcr to the metadata. Remember that to do this, the fields have to be present in both datacapture.cfg and in the fields config in metatagger.
Cheers!
Johnny
Do you use presentation templates for generation?
Try writing them in a PERL block in your PT. That's probably the easiest way to do it.
I've used that practise many times over.
John Cuiuli
kellyrmilligan
For this situation, we are parsing the xml into a db, etc, etc, so no tpl's are involved. In the last post I got it working, and for tpl's that we use this is not needed. Thanks for the tip though, that might come in handy at some point, what was the scenario for using this? writing the metadata to a search engine?
Johnny
No usually for other system processing (it can be easier to process the EA's rather than the DCR) and for TeamSite search.
John Cuiuli
kellyrmilligan
That makes sense, I might have to do that myself for search, right now though our static pages don't have much metadata to search on.