Highlighted

Determine if output is in Preview or Published?

Explorer ,
Jul 14, 2020

Copy link to clipboard

Copied

Is there an easy way to identify is a project is being shown from Preview or from being Published?

E.g. a global variable that indicates this automatically.

I want to determine this in order to adjust path references that are to be different if Published or run as a Preview.

Views

34

Likes

Translate

Translate

Report

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

Determine if output is in Preview or Published?

Explorer ,
Jul 14, 2020

Copy link to clipboard

Copied

Is there an easy way to identify is a project is being shown from Preview or from being Published?

E.g. a global variable that indicates this automatically.

I want to determine this in order to adjust path references that are to be different if Published or run as a Preview.

Views

35

Likes

Translate

Translate

Report

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

Copy link to clipboard

Copied

Not sure if I follow...

You can only launch a "preview" from within Captivate so I would think you would know because you made the choice just then to preview - as in HTML5 in Browser. So - really - the preview is limited to the developer.

 

No one else is going to see your project unless you publish it - or perhaps give them your project file.

In that light, you could easily tell by looking at the URL

In preview - it would indicate as such in the URL

If published, the URL would match the location where the files are stored.

 

Am I missing something in your question?

Stagprime_0-1594727951834.png

 

 

Likes

Translate

Translate

Report

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

Copy link to clipboard

Copied

A published project would typically have all the elements of the project packaged with it - unless you are doing something with the project after you publish it.

This means you can grab that published folder and place it in multiple locations and all the stuff needed for it to work should follow along.

Even things like HTML5 animations that are created externally but brought into Captivate are packaged up as well.

In the case of an HTML5 Animation - it would be placed in the wor folder upon publish.

I believe that to stand for  Web Object Resources

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 14, 2020 0
phd3 LATEST
Explorer ,
Jul 14, 2020

Copy link to clipboard

Copied

As you see from your example, that Temp directory is buried in the profile temp folder, and changes every time it is previewed. In referening a file then I need to go up a folder and down into another in order get to the file I need.

When publishing the whole file structure is buried in a .zip file and I'm having to add the data files manually into that structure. In doing so all the folder references are different! I was trying to see if I could automatically determine whether the file is being previewed or published in so that the file reference paths can be adjusted according, and programmatically.

 

As you've seen from my other thread, you can gather what I'm trying to do, this was a thought, just approaching from a different angle!

Likes

Translate

Translate

Report

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