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)
vpath from formapi ?
nipper
I know the answer is out there, but I just cannot find it. Can someone point me to the command to get the vpath ffrom FormAPI ? I know there is a FM to RT but I cannot find it.
Andy
Find more posts tagged with
Comments
Migrateduser
Are you talking about something like:
function getWorkarea()
{
return( top._dcWin.gWorkarea );
}
function retrieveDCRName()
{
var dcrName = IWDCRInfo.getDCRName();
// Convert all empty values to null for easier comparison.
if ( dcrName == undefined || dcrName == "" )
{
dcrName = null;
}
return( dcrName );
}
nipper
Close,
we have in templates:
/templatedata/cat/type/data/DIR1/SUBDIR/ANOTHERSUBDIR/file23
IWDCRInfo.getDCRName(); returns file23 but I need all of the stuff in between. Since they all use the same DCT, I cannot hardcode it
Andy
Migrateduser
I think for me getDCRName() returns the path (relative to /data/) - are you saying that for you it just returns the file name? I forgot about:
function getCategoryAndType()
{
return( top.gTDT );
}
Then:
"templatedata/" + getCategoryAndType() + "/data/" + IWDCRInfo.getDCRName();
I don't like hard-coding templatedata and data but then again I don't think they will change.
prb.png
Jens
Try this.
var dcrVPath = parent.gDCRVPath;
mogoo
Jens-
Now where did you get that call from? Is there a list of them somewhere? I didn't see them in the documentation, but I also know, from another post, that you can do this, too...
var workarea = parent.gWorkarea;
...is there somewhere where there's a list of these?
thanks,
maureen
prb.png
syim
It seems to be some undocumented stuff. Check following post:
http://devnet.interwoven.com/forums/cgi-bin/showthreaded.pl?Cat=&Board=PRODUCTS_TEMPLATING&Number=7750&page=&view=&sb=&o=&vc=1
Jens
I got it from that post too.
But if there are more functions, it would be nice to have a complete list of that.
Migrateduser
You may be able to use a technique like this one to check the properties on parent?
for ( prop in parent )
{
alert( prop + "=" + parent[prop] );
}
Anything undocumented that you use should probably go in a FormAPI function stored in a file shared to all DCTs (don't call the undocumented function directly) so if they change the function name, location, etc. you can fix your code in one place.
There is also a (freeware?) thing called WebTool that can help reverse engineer all these frames.
http://devnet.interwoven.com/forums/cgi-bin/showthreaded.pl?Cat=&Board=PRODUCTS_TEMPLATING&Number=12094&Search=true&Forum=All_Forums&Words=reverse%20engineer&Match=Entire%20Phrase&Searchpage=0&Limit=25&Old=allposts&Main=12094