Constants.FV_BK_FOLDER - how get folder name ?

Community Beginner ,
Sep 28, 2018

Copy link to clipboard

Copied

Hello.

In book hierarchy - we see folder - how to get folder name ? 

var compType=comp.ComponentType;

if(Constants.FV_BK_FOLDER == compType || Constants.FV_BK_GROUP == compType)

{

comp = comp.NextComponentInBook;

print "folder name"   - how to do this ?    comp.Name or comp.path does not help

TOPICS
Scripting

Views

298

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Engaged ,
Sep 28, 2018

Copy link to clipboard

Copied

try

comp.ComponentDisplayText

or

comp.BookComponentTitle

otherwise set a breakpoint there and have a look at data browser.

Markus

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Community Beginner ,
Sep 28, 2018

Copy link to clipboard

Copied

Big Thanks

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Community Beginner ,
Oct 01, 2018

Copy link to clipboard

Copied

This shows group name - I need folder name.

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Enthusiast ,
Oct 01, 2018

Copy link to clipboard

Copied

I've just tried this on FrameMaker 2019 and it seems to work as expected:

comp.BookComponentTitle = 'myFolderName';

To write the folder name to the Javascript console:

$.writeln (comp.BookComponentTitle);

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more