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)
manipulating <browser> element
conmgmt
Is there a way to populate only the filename rather than the whole path when you select a file from the window opened by <browser> element on dct ?
To make it more clear.....
a. I have a browse element on my dct ....
<browser initial-dir="/templatedata/category/type/data"/>
b. This creates a browse button on the DCT. When I click this button, a window opens up with the list of files in directory /templatedata/category/type/data.
c. When I click on the file within this dir, the full path i.e /templatedata/category/type/data/fileselected gets populated on the dcr
I want only the filename to get populated...
any suggestions?
Find more posts tagged with
Comments
Adam Stoller
Why do you only want the filename without the area-relative path information in the DCR?
You can always strip the path information out when generating an output file with a PT...
--fish
(Interwoven, Curriculum Development)
james1
You can do this with FormAPI.
-- James
manju166
u can skip templatedata
<browser required="t" initial-dir="/category/type/data"/>
conmgmt
We won't be having any tpl. The idea is to disassociate path info
akshathp
Maybe this could be done but I have a question here. Is it that in the TPL you want only the filename and not the full path. If so then you could use <iw_perl> and have PERL regex to filter the filename. Which will be in a varibale and then you could use it anyway you want in the presentaion template.
Or, are you just trying to make the DCT look better without the fullpath value?
Hope this helps.
Akshat Pramod Sharma
Interwoven Inc.
conmgmt
we don't have tpl. so want to remove the path association in dct itself
akshathp
So where exactly are you using the content entered into the DCR? Please give some more details on what are the steps you have.
Akshat Pramod Sharma
Interwoven Inc.
Adam Stoller
The only way I can think of to do this would be for you to create your own browser callout and thus you'd have control over the value sent back into the DCT/DCR - I believe the browser element always puts the area-relative path into the DCT/DCR because that is what it was designed to do.
--fish
(Interwoven, Curriculum Development)
Migrateduser
It can be done in tpl as akshat has already said.
However, your statement
"we don't have tpl. so want to remove the path association in dct itself"
is a bit confusing.
Anyway, here is a TechNote on how to strip the path.
http://devnet.interwoven.com/site.fcgi/techlib/002280
Personally, one problem I faced in the above TechNote was dcr.Picture not being in quotes. Otherwise it works for me and I've used it.
Hope it helps.
Thanks
Saravanan
Adam Stoller
You folks keep proposing the use of a PT - which I do think is a reasonable way to go - but the request was to have the path trimmed in the DCR presumably because they are planning on deploying the data in the DCR directly (either as an XML file asset, or using DataDeploy as DB data) to its target - it may be more of the '20' in the '80/20' rule - but it's still a valid way of doing things.
Again - I believe the only way to achieve that functionality within the product as it stands now - is to create your own browser callout code so that *you* have control over the data that is stored in the DCR.
The existing browser option was designed for the '80' side of the '80/20' rule - which involves the use of PTs to massage any data that needs massaging before it is used outside of the DCR.
As a possible "happy-medium" - I did once work on a project where we used a PT to translate the DCR XML into a more "normalized" XML *and then* used DataDeploy on the generated XML file to transfer the DCR data into a DB. I.e. PT's aren't just for generating HTML...
If I am misinterpreting the reason for the need to make the changes directly in the DCR - perhaps you could enlighten all of us a little more as to why this is necessary?
--fish
(Interwoven, Curriculum Development)