SWP not finding local images - how to reference

8 views
Skip to first unread message

Jack Hodges

unread,
Aug 1, 2019, 6:53:45 PM8/1/19
to TopBraid Suite Users
I forgot how to locate images in the local workspace in SWP. Luckily I had some old examples where I had either gotten some assistance or figured it out (more likely the former), and got it to work, but am wondering where in the documentation this is to be found. Thank you!

Jack

Holger Knublauch

unread,
Aug 1, 2019, 7:01:11 PM8/1/19
to topbrai...@googlegroups.com

To get references to files in the workspace, place them in a folder ending with .www. For example

    /root/myimages.www/test.png

can usually be displayed using

    <img src="{= ui:lib() }/myimages/test.png" />

Holger


On 2/08/2019 08:53, Jack Hodges wrote:
I forgot how to locate images in the local workspace in SWP. Luckily I had some old examples where I had either gotten some assistance or figured it out (more likely the former), and got it to work, but am wondering where in the documentation this is to be found. Thank you!

Jack
--
You received this message because you are subscribed to the Google Groups "TopBraid Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to topbraid-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/1ecc2c13-55cc-49bc-83e5-2b5ce4cc9259%40googlegroups.com.

Jack Hodges

unread,
Aug 2, 2019, 11:29:01 AM8/2/19
to TopBraid Suite Users
That is exactly what I found/did, but I was wondering where it is documented (for the next time I forget). Thank you.

Jack


On Thursday, August 1, 2019 at 4:01:11 PM UTC-7, Holger Knublauch wrote:

To get references to files in the workspace, place them in a folder ending with .www. For example

    /root/myimages.www/test.png

can usually be displayed using

    <img src="{= ui:lib() }/myimages/test.png" />

Holger


On 2/08/2019 08:53, Jack Hodges wrote:
I forgot how to locate images in the local workspace in SWP. Luckily I had some old examples where I had either gotten some assistance or figured it out (more likely the former), and got it to work, but am wondering where in the documentation this is to be found. Thank you!

Jack
--
You received this message because you are subscribed to the Google Groups "TopBraid Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to topbrai...@googlegroups.com.

Holger Knublauch

unread,
Aug 2, 2019, 8:50:25 PM8/2/19
to topbrai...@googlegroups.com

The concept of .www folders is explained here

http://wiki.topquadrant.com/display/TBS61/Developer+Guide#DeveloperGuide-ChangingCSSStyles

As so often, this doesn't answer your exact question on how to reference images, but mentions the general background that users can then apply in different scenarios.

If something is not documented (yes this does happen a lot), the source code is often a good place to start. For example, if you see a page that references a local image, right click on it in Chrome (or so) and open developer tools to inspect the source code behind it. Then try to find the same spot in the SWP (e.g. open the EDG collection graph in TBC that imports everything and then do a text search). For many common tasks, you can copy recipes from other components.

Holger

To unsubscribe from this group and stop receiving emails from it, send an email to topbraid-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/c4dde6c2-0aaf-4d38-ac65-458230637b5d%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages