Accessing images in a style repository

Please post all questions and comments regarding Help & Manual 7 here.

Moderators: Alexander Halser, Tim Green

Post Reply
rodrikwade
Posts: 14
Joined: Sat May 05, 2018 5:41 pm

Accessing images in a style repository

Unread post by rodrikwade » Tue May 22, 2018 1:16 pm

Hi

We have a style repository that in addition to our common styles includes title page and copyright notice topics. These topics are used as snippets in our projects, for example:

<topic template="Default" lasteditedby="Smith" version="2">
<title>Title page</title>
<body>
<para styleclass="Normal"><snippet src="Our_repository::Title-Page" inline="false"/></para>
</body>
</topic>

The style repository is checked out by writers from SVN to their local copy and using the Repository Manager, they reference the style repository. The referenced snippets appear in the project as expected but the image referenced in the Title-Page snippet does not appear until such time as the project search path has been explicitly updated to include the folder containing the local copy of the style repository.

Is this the expected behaviour or are we doing something wrong?

If it is the expected behaviour, is there any way to set up the search path to make use of the repository path (as defined in the Windows Registry)?

Regards

Rodrik

User avatar
Tim Green
Site Admin
Posts: 22103
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: Accessing images in a style repository

Unread post by Tim Green » Tue May 22, 2018 4:41 pm

Hi Rodrik,
The referenced snippets appear in the project as expected but the image referenced in the Title-Page snippet does not appear until such time as the project search path has been explicitly updated to include the folder containing the local copy of the style repository.
That is currently expected behavior, since Help+Manual always locates images by searching the search path folders from top to bottom and inserting the first image it finds with a matching filename. This also means that you need to be careful to avoid duplicate filenames in multiple folders, because the search for an image file always stops as soon as a match has been found. :)
Regards,
Tim (EC Software Documentation & User Support)

Private support:
Please do not email or PM me with private support requests -- post to the forum directly.

rodrikwade
Posts: 14
Joined: Sat May 05, 2018 5:41 pm

Re: Accessing images in a style repository

Unread post by rodrikwade » Thu May 24, 2018 4:23 pm

Hi Tim

Thank you very much for the confirmation..

Rodrik

User avatar
Rob Davis
Posts: 145
Joined: Tue Sep 06, 2011 9:45 am

Re: Accessing images in a style repository

Unread post by Rob Davis » Wed Jan 13, 2021 12:51 pm

Adding to this question.

My objective is to find a place where all my projects can access shared images WITHOUT an additional Search Path entry in each Project. If the Topics can be in the Repository without needing the Repository to be in the Search Path, then why not the images too?

The Repository can contain topics which are used as snippets by projects linked to that Repository.
AND the Repository itself has a Search Path, and one can edit the topic see the graphics while the Repository is open in H&M.

I quessed that the images found in the Repository's Search Path would be available to the target project that uses the Repository.
Seems this is not true, or I am doing something wrong?

Just sayin'!
Last edited by Rob Davis on Wed Jan 13, 2021 1:55 pm, edited 1 time in total.

User avatar
Tim Green
Site Admin
Posts: 22103
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: Accessing images in a style repository

Unread post by Tim Green » Wed Jan 13, 2021 1:52 pm

Hi Rob,

Images are available to the topics in the style repository because they are in the repository's own search path. They aren't currently available to outside projects for general use unless the same image folders are added to the search path of that project. I'm going to check with our developers to see whether this functionality can be extended or not. :)
Regards,
Tim (EC Software Documentation & User Support)

Private support:
Please do not email or PM me with private support requests -- post to the forum directly.

User avatar
Rob Davis
Posts: 145
Joined: Tue Sep 06, 2011 9:45 am

Re: Accessing images in a style repository

Unread post by Rob Davis » Wed Jan 13, 2021 2:00 pm

Thanks Tim
It does seem logical that if the topics in the repository are available to linked projects, and the images in the topics themselves are available when editing in the repository, then the images should likewise be available without an explicit Search Path in the target project.
I look forward to your answer from the developers.
Rob

User avatar
Tim Green
Site Admin
Posts: 22103
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: Accessing images in a style repository

Unread post by Tim Green » Thu Jan 14, 2021 2:18 pm

Hi Rob,

Update: I was wrong in my assumption. The repository paths are actually used as well. The general search sequence for images goes like this:
  1. Search the paths in the project's search path. If a matching file is found, use it. Stop.
  2. If the image hasn't been found while publishing and the skin being used contains paths, search those first. Stop if a matching file is found.
  3. If the image still hasn't been found and a repository is linked to the project, search the paths in the repository.
Step 2 is not relevant while editing, of course, only while publishing. I add it there to clarify when paths added to skins get evaluated.

Our guess as to what is happening in your case is that the repository may not be properly linked to the project, or may not be currently available. It's easy to miss this if you are mainly using just the styles from the repository because the project contains linked copies of the styles, which work just as well when the repository isn't available. You could try unlinking and relinking the repository.

Another possibility is that the relevant path in the repository isn't currently available. Also avoid having too many path references generally. More than a handful should be considered too many, simply for practical purposes. (I've seen user projects with over 200...)
Regards,
Tim (EC Software Documentation & User Support)

Private support:
Please do not email or PM me with private support requests -- post to the forum directly.

Post Reply