I use snippets quite extensively. In a number of cases, I want to add links in the snippet jump to a section in the document but the link is defined based on where the snippet is placed. I.e. base on where the snippet is inserted, I need to define the link.
Is there a way to do this?
Thank you,
Ed Dressel
Snippets and Links
Moderators: Alexander Halser, Tim Green
- Tim Green
- Site Admin
- Posts: 23184
- Joined: Mon Jun 24, 2002 9:11 am
- Location: Bruehl, Germany
- Contact:
Re: Snippets and Links
Hi Ed,
The short answer to this is no, because there is a no way for a snippet to "know" where it is being used. The longer answer is "that depends": The only thing you can really do is include all the links you might want to use in the snippet enclosed in conditional text tags. Then you would activate the build options for those tags on publishing as required to include or exclude the links in the snippets. For this to work you would need to have all the build options you want to use defined both in all the projects where the snippets are going to be used, and in the project in which you are managing the snippets.
The short answer to this is no, because there is a no way for a snippet to "know" where it is being used. The longer answer is "that depends": The only thing you can really do is include all the links you might want to use in the snippet enclosed in conditional text tags. Then you would activate the build options for those tags on publishing as required to include or exclude the links in the snippets. For this to work you would need to have all the build options you want to use defined both in all the projects where the snippets are going to be used, and in the project in which you are managing the snippets.
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.
Tim (EC Software Documentation & User Support)
Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
- Ed Dressel
- Posts: 226
- Joined: Tue May 11, 2004 6:40 pm
Re: Snippets and Links
Tim:
Thank you for your response. I am not sure that will work in my case as the links are not defined at compile time, but are set is not based on content. It is based on context/location.
For example, if I have these snippets
Snippet 1: intro to music. Links to history and musicians included.
Snippet 2: Section on history.
Snippet 3: Section on musicians.
I want to insert these two snippets into multiple different sections of my help file, but I want the links to be close to where they are at, not jump to some far off location.
I do not see how I could achieve this even with conditional text (and even with that, it would occur in many, many places in my project).
Right now, I have snippets for before links and after links but this is becoming painful to manage.
It would be nice if an inserted snippet could have its links define by right-clicking over the snippet and option for defining where the links in the insert jumped to.
Does that make sense?
Ed Dressel
Thank you for your response. I am not sure that will work in my case as the links are not defined at compile time, but are set is not based on content. It is based on context/location.
For example, if I have these snippets
Snippet 1: intro to music. Links to history and musicians included.
Snippet 2: Section on history.
Snippet 3: Section on musicians.
I want to insert these two snippets into multiple different sections of my help file, but I want the links to be close to where they are at, not jump to some far off location.
I do not see how I could achieve this even with conditional text (and even with that, it would occur in many, many places in my project).
Right now, I have snippets for before links and after links but this is becoming painful to manage.
It would be nice if an inserted snippet could have its links define by right-clicking over the snippet and option for defining where the links in the insert jumped to.
Does that make sense?
Ed Dressel
- Tim Green
- Site Admin
- Posts: 23184
- Joined: Mon Jun 24, 2002 9:11 am
- Location: Bruehl, Germany
- Contact:
Re: Snippets and Links
Hi Ed,
Yes, it makes sense, but there would be no practical way of implementing what you describe there. A snippet can contain any amount of text and any number of links.It would be nice if an inserted snippet could have its links define by right-clicking over the snippet and option for defining where the links in the insert jumped to.
Does that make sense?
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.
Tim (EC Software Documentation & User Support)
Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
- Ed Dressel
- Posts: 226
- Joined: Tue May 11, 2004 6:40 pm
Re: Snippets and Links
Tim:
I sincerely appreciate your response.
I hope you can find a way--redirecting links in snippets would be a wonderful feature and save me hours of work.
I appreciate the years of consistent hard work that you and your team put into support and a quality product.
Ed Dressel
I sincerely appreciate your response.
I hope you can find a way--redirecting links in snippets would be a wonderful feature and save me hours of work.
I appreciate the years of consistent hard work that you and your team put into support and a quality product.
Ed Dressel