How do you excerpt include into link?
Asked by H?seyin ?elik:

I want to excerpt include in link but link edit does not allow excerpts.

By the way if there is another way to reuse information, I would love to know. Excerpts are really cumbersome in my opinion.

Sample:

excerpt : some.url.com

usage: {excerpt include}/somepage {excerpt include}/somepage2


Answers:
author: Nic Brough -Adaptavist-
body: I'm not sure what you're trying to achieve here, and I can't work out what you're trying to do with excerpts.

They work like this:

```
Page-1:
```

```
Code: Lorem ipsum {excerpt} dolor sit {excerpt} amet.
```

```
Display: Lorem ipsum {excerpt} dolor sit {excerpt} amet.
```

```
?
```

```
Page-2:
```

```
Code: consectetur adipiscing {excerpt-include:Page-1} elit,
```

```
Display: consectetur adipiscing dolor sit elit,
```

```
?
```

Could you explain a little more what you're aiming for? I don't think excerpts are the right approach, but I'm not sure of the goal.

comments: author: H?seyin ?elik
body: I cant build urls as you said. I will just use concatenated text as you mentioned in the comment. Accepting this as answer, this is as good as it gets.


author: Sandy Johnson
body: Why not create an anchor in the excerpt and then link to the anchor?

comments: author: H?seyin ?elik
body: It looks like this then: <http://aaa.bbb.ccc>/ddd

I want to add that ddd or in another page eee etc. to the link


author: Sandy Johnson
body: right, un should look something like [www.myconfluence.com/mypage#myanchor](http://www.myconfluence.com/mypage#myanchor)

Check out <https://confluence.atlassian.com/conf58/links-771892000.html> for help on links and anchors


author: H?seyin ?elik
body: Anchor is worse than excerpt in my case. People have to go to another page to view information. What i want is, reuse same information everywhere and when i want to change that i will change it in only 1 place. Excerpt provides this but it can't be in a link. Excerpt can be a link but excerpt-include can't be included in a link.


author: Sandy Johnson
body: Ah, now we are getting some where. What you are talking about is one of the basic tenets of a wiki - reusable content with a single source of truth (i.e. it is only in one place, but used in many).

Check out [https://confluence.atlassian.com/confcloud/develop-technical-documentation-in-confluence-724765468.html?selectedPageVersions=43\&selectedPageVersions=44](https://confluence.atlassian.com/confcloud/develop-technical-documentation-in-confluence-724765468.html?selectedPageVersions=43&selectedPageVersions=44)

Here they are talking about creating technical documentation, but the concepts can be applied to any type of content.


author: Robert Reiner _smartics_
body: If you want to define base URLs to use for referencing pages outside your Confluence instance, you may have a look at the [Information Systems Add-on](https://www.smartics.eu/confluence/x/XAFwAg) for the [projectdoc Toolbox](https://www.smartics.eu/confluence/x/EAFk).

The Information Systems Add-on uses [space properties](https://www.smartics.eu/confluence/x/SQNwAg) to define base URLs and allows to use these in macros to link to or transclude from external resources. If you paste in an URL to such a resource the add-on autoconverts it to the macro. So if the base URL changes, you could change it in only one place and the macros will link to the new location automatically.

Since space properties are hierarchical in nature, you may define these URLs as close to the space the URLs are used as you like (and use [placeholders](https://www.smartics.eu/confluence/x/jwNk#SpaceProperties-Placeholders) to construct them).

Please note while the [Information Systems Add-on is available for free on the Atlassian Marketplace](https://marketplace.atlassian.com/1215319), you need to install the [commercial projectdoc Toolbox Add-on](https://marketplace.atlassian.com/1212629) to get it working. The projectdoc Toolbox provides the infrastructure (such as space properties or multi-transclusions) the add-on relies on.

Also note that I'm one of the authors of these add-ons. :smile:


author: H?seyin ?elik
body: What i want is:

Page-1:

Code: {excerpt}aaa.bbb.ccc{excerpt}

Page-2

Code: {excerpt-include:Page-1}/ddd

Display: [aaa.bbb.ccc/ddd](https://answers.atlassian.com/aaa.bbb.ccc/ddd)

By the way thanks for fast reply

comments: author: Nic Brough -Adaptavist-
body: You can do the text of that, but it won't quite concatenate the text together, so you can't build urls with it.

I'd write a user macro to deal with it myself.


author: H?seyin ?elik
body: Sorry for writing another answer, didn't see the comment button.