Repository Nested Snippets

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

Moderators: Alexander Halser, Tim Green

Post Reply
scotcro
Posts: 32
Joined: Thu Jul 19, 2007 2:18 am
Location: Vancouver, WA USA

Repository Nested Snippets

Unread post by scotcro »

I am wondering if it is possible to include one snippet within another in a repository, and if so how to reference them in the repository, so when they are added to a regular project both parent and child snippets resolve properly.
s.
simon harris
Posts: 30
Joined: Thu Jul 26, 2018 1:35 am
Location: syd - AU

Re: Repository Nested Snippets

Unread post by simon harris »

hi scotcro,

just make sure the repo project has its own topics folder as one of the project search paths and you should be good to go.
All the best,
Simon
scotcro
Posts: 32
Joined: Thu Jul 19, 2007 2:18 am
Location: Vancouver, WA USA

Re: Repository Nested Snippets

Unread post by scotcro »

Simon, Thanks for the quick response. I had already done that in the repository.

I should clarify that I want the child snippet to be linked, not pasted in.

I can easily insert the child snippet in a repository topic and it looks good in the repository, but when I insert the parent repository topic into a normal project, the parent topic links fine because it has the repository name prefix in the snippet tag:

Code: Select all

<snippet src="ESPBaseRepository::Activities.Add_Budget_Item" inline="false"/>
,
but the child snippet within the parent does not have the repository name prefix:

Code: Select all

<snippet src="Ideal_Scope" inline="false"/>
resulting in the "Missing Snippet" error.
s.
User avatar
Tim Green
Site Admin
Posts: 23156
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: Repository Nested Snippets

Unread post by Tim Green »

Hi Scott,
but the child snippet within the parent does not have the repository name prefix:
That's a stumbling block, but there's a trick you can use to work around this. Instead of using the From Topic option to insert the child snippet within the repository use the From File option and select it directly from the \Topics folder in the repository directory. Then it will be correctly referenced, even when its parent snippet is used. 8)
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.
scotcro
Posts: 32
Joined: Thu Jul 19, 2007 2:18 am
Location: Vancouver, WA USA

Re: Repository Nested Snippets

Unread post by scotcro »

Thanks Tim! I'll give that a try.
Any thought of remedying this in the future with something like '.::mychildsnippet' or '::mychildsnippet' to cause it to reference the parent snippet repository?
s.
s.
User avatar
Tim Green
Site Admin
Posts: 23156
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: Repository Nested Snippets

Unread post by Tim Green »

scotcro wrote:Thanks Tim! I'll give that a try.
Any thought of remedying this in the future with something like '.::mychildsnippet' or '::mychildsnippet' to cause it to reference the parent snippet repository?
s.
We're looking into it.
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
Tim Green
Site Admin
Posts: 23156
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: Repository Nested Snippets

Unread post by Tim Green »

Hi Scott,

Update: This has now been changed. Now nested snippets from a repository (i.e. that are nested within the repository) should work normally when inserted directly. The change will be included in the next maintenance update but you can get it in advance with the stable beta if you like:

https://www.helpandmanual.com/download/ ... p-v743.exe
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.
scotcro
Posts: 32
Joined: Thu Jul 19, 2007 2:18 am
Location: Vancouver, WA USA

Re: Repository Nested Snippets

Unread post by scotcro »

Awesome! I'll give it a try.
s.
Post Reply