Archi Forum

Archi => General Archi Discussion => Topic started by: DuncanWilliam on June 09, 2020, 13:49:54 PM

Title: Set HTML report to open on a canvas view
Post by: DuncanWilliam on June 09, 2020, 13:49:54 PM
Hi all,

I'm currently playing around with hosting the HTML report so I can share a dynamic model with potential stakeholders to great success. To make things a bit more user friendly, is there a way to set the default blank 'home view' to the canvas view within my model tree as the default?

Thanks,
Duncan
Title: Re: Set HTML report to open on a canvas view
Post by: Alberto on June 09, 2020, 16:47:12 PM
Second this. AFAIK it defaults to the model's purpose page so right now I'm doing a find and replace after the HTML report is published.
Title: Re: Set HTML report to open on a canvas view
Post by: Phil Beauvoir on June 10, 2020, 15:18:49 PM
Specifying a "home view" is obviously not implemented in the export to HTML report (if it were, it would have to be selectable in the export dialog box). But if you know the ID of the view you can search and replace the id in "index.html"

For example if the id of the view is id-d846cfb116984ad98ab6b5f6aa0635ea

then find this line:


<iframe name="view" class="ui-layout-center" src="id-c6ae148b425b4632b5bc47ab510560f6/elements/model.html" scrolling="no"></iframe>


And replace src with the id of the view like this:


<iframe name="view" class="ui-layout-center" src="id-c6ae148b425b4632b5bc47ab510560f6/views/id-d846cfb116984ad98ab6b5f6aa0635ea.html" scrolling="no"></iframe>


I guess it might be possible to write a jArchi script to do that...
Title: Re: Set HTML report to open on a canvas view
Post by: DuncanWilliam on June 14, 2020, 21:13:31 PM
Thanks Phil, thats works fine for my usage.