---
title: "Publish and syncing a page with in-page links"
canonical: "https://support.appfire.com/space/CPCL/1286602822/Publish%20and%20syncing%20a%20page%20with%20in-page%20links"
format: markdown
---
> Macro (aura-html)


## Overview

When using Comala Publishing to manage and publish pages from a source space in Confluence Cloud, internal and external links are handled carefully to ensure they work correctly after publishing. 

When a source page includes an in-page link to another page in the source space, on publishing and syncing the page

- in-page links in the published target space page point to the page in the target space

The in-page link is automatically updated each time the page is published to prevent broken links. Different Confluence link macro formats on the source space page can affect how Confluence displays the link on the published target space page.

## Publishing in-page links

| ### URL | **Source space in-page link** | **Target space published in-page link** |
| --- | --- | --- |
| **URL** | Displayed link on the source space page to another page in the source space:<br>![url_link_withconfluencelinktoolbox.png](media://cc85e98d-cf2e-46b2-b530-4150cb2875ab) | Displayed link on published and synced page:<br>![cpc_url_displayed_targetspacepagelink_updated_displayofpagename_onpublishandsync.png](media://90ed489e-abd6-4a66-9574-1278484b2443)<br>> ℹ️ The displayed published in-page link replaces the URL displayed in the source space with the title of the destination page in the target space.<br>Published and synced target space in-page link URL is updated with the space key for the target space and the target space page contentID. |
| The URL in the source space to another page in the source space **CPCD** is:<br>```
https://appfire.atlassian.net/wiki/spaces/CPCD/pages/614696400/User+Guide 
``` | The link URL in the published and synced target space **CPCL** is updated to point to a page in the target space:<br>```
https://appfire.atlassian.net/wiki/spaces/CPCL/pages/646807689/User+Guide
```<br>- space key is for the target space -  in our example, `CPCL`
- page contentID is for the published target space page - in our example, `646807689`<br>Both the published page and the published link URL use the same page name as the source space page and link. |
| > 📝 The published URL link URL is updated to a destination URL for a page the target space. |
| **Custom display text** | Displayed link on the source space page to another page in the source space:<br>![url_customtext_link.png](media://d9408aa7-11ac-4f61-95b8-bc78cd8f79bd)<br>![url_customtext_link_editbox.png](media://03ac3214-efe1-497f-ab03-8f4c24d435ef) | Displayed link on published and synced page:<br>![url_customtext_link.png](media://d9408aa7-11ac-4f61-95b8-bc78cd8f79bd)<br>> ℹ️ The published in-page link maintains the source page **Display text** link configuration.<br>The published and synced target space in-page link URL is updated with the space key for the target space and the target space page contentID. |
| The URL in source space with space key **CPCD** configured to **Display text **is:<br>```
https://appfire.atlassian.net/wiki/spaces/CPCD/pages/614696400/User+Guide 
``` | The published URL in the target space **CPCL** for the displayed link is<br>```
https://appfire.atlassian.net/wiki/spaces/CPCL/pages/646807689/User+Guide
```<br>- space key is for the target space - in our example, `CPCL`
- page contentID is for the published target space page - in our example, `646807689`<br>The published link URL uses the same page name as the source space page. |
| > 📝 The published URL custom display text link URL is updated to a destination URL for a page the target space. |

The following **URL type links** in a source space page are not updated on publishing:

- short page links** **(both URL and URL with custom display text links)
- links to another page in the same Confluence site (both URL and URL with custom display text links)
- inks to another page on an external site (both URL and URL with custom display text links)

| ### Inline | **Source space in-page link** | **Target space published in-page link** |
| --- | --- | --- |
| URL | Displayed link on the source space page to another page in the source space:<br>![inline_url_withlinktoolbox.png](media://c05e0c1e-5f1e-4d8e-b91e-5e999b186640) | Displayed link on published and synced page:<br>![inlinelinkdisplay.png](media://5bdca436-f48e-49d5-b695-a8b34458d895) |
| Inline link URL in source space with space key **CPCD** is:<br>```
https://appfire.atlassian.net/wiki/spaces/CPCD/pages/614696400/User+Guide 
``` | The published inline link URL in the target space **CPCL** is:<br>```
https://appfire.atlassian.net/wiki/spaces/CPCL/pages/646807689/User+Guide
```<br>- space key is for the target space - in our example, `CPCL`
- page contentID is for the published target space page - in our example, `646807689` |
| > 📝 The published inline link URL is updated to a destination URL for a page in the target space. |

The following **inline type links** in a source space page are not updated on publishing:

- short page links** **(both URL and URL with custom display text links)
- links to another page in the same Confluence site (both URL and URL with custom display text links)
- links to another page on an external site (both URL and URL with custom display text links)


| ### Card | **Source space in-page link** | **Target space published in-page link** |
| --- | --- | --- |
| Page in the source space | ![cpc_card_link_source_space.png](media://f88d6992-d797-43a3-8535-2dc84970a78c) | ![cpc_card_link_targetspace.png](media://608a2584-77bf-4b30-a1b7-53afbda85c8c) |
| The card link URL in source space with space key **PMCD** is:<br>```
https://appfire.atlassian.net/wiki/spaces/PMCD/pages/614696456/Product+Lifecycle 
``` | The published card link URL in the target space **PMCL **is:<br>```
https://appfire.atlassian.net/wiki/spaces/PMCL/pages/616696410/Product+Lifecycle
```<br>- space key is for the target space - in our example, `PMCL`
- page contentID is for the published target space page - in our example, `616696410` |
| > 📝 The published card link URL is updated to a destination URL for a page in the target space. |

The following **card type links** in a source space page are not updated when publishing the page:

- short page links** **
- links to another page in the same Confluence site
- links to another page on an external site

| ### Embedded | **Source space in-page link** | **Target space published in-page link** |
| --- | --- | --- |
| Short link to another space or location | ![cpc_embed_link_source_space.png](media://141fd5eb-e551-43f0-8f98-35b8f0141e8d) | ![cpc_embed_link_target_space.png](media://b8fff5f2-264e-4c1b-bf70-7a3494401994) |
| The card link URL in source space with space key **PMCD** is:<br>```
https://appfire.atlassian.net/wiki/spaces/PMCD/pages/614696456/Product+Lifecycle 
``` | The card link URL in the target space **PMCL** is:<br>```
https://appfire.atlassian.net/wiki/spaces/PMCL/pages/616696410/Product+Lifecycle
```<br>- space key is for the target space - in our example, `PMCL`
- page contentID is for the published target space page - in our example, `616696410` |
| > 📝 The published embedded link URL is updated to a destination URL for a page in the target space. |

The following **embedded type links** in a source space page are not updated when publishing the page:

- short page links** **
- links to another page in the same Confluence site
- links to another page on an external site

> Macro (excerpt)
> 
> ### In-page links to headings and anchors
> 
> In-page hyperlinks to headings or anchors in the current page or to another source space page are updated to the destination target space page when the page is published.
> 
> For the following link on a page to a heading on another page in the source space
> 
> ![cpc_onpage_extract_link.png](media://0784c622-19d2-41dc-ba0b-9d227e376a9c)
> 
> In the source space page in the NTSD space:
> 
> ```
> https://companysite.atlassian.net/wiki/spaces/NTSD/pages/2719744005/Staff+handbook+-+Americas#USA-specific-appendices
> ```
> 
> In the published target space page in the NTS space:
> 
> ```
> https://companysite.atlassian.net/wiki/spaces/NTSD/pages/2719744005/Staff+handbook+-+Americas#USA-specific-appendices
> ```
> 
> However, if the destination page is not published, the l*inks to the headings on these pages are not updated* but are directed to the source space page. Subsequently, publishing the destination page automatically updates these links to this newly published page in the target space. 
> 
> ### In-page links created in Confluence macros
> 
> In-page links on a source space page created using macros such as the **children **or **page tree** macros are updated.
> 
> When using Confluence page macros to add dynamic content to source space content, for example, the **content by label** macros, set a filter in the macro as the `current space`. When publishing the page, the macro displays content in the target space.
> 
> ### In-page links created in third-party macros
> 
> Links within third-party macros to other pages in the source space depend on the app. When using these macros, you should check that these links are updated to the target space when publishing a page.
> 
> ### Confluence space links
> 
> When a page is published, links to Confluence space elements, such as the **Confluence Calendar**, are updated to the target space.
> 
> The source space page link in the **NTSD** space:
> 
> ```
> https://companysite.atlassian.net/wiki/spaces/NTSD/calendars
> ```
> 
> The published target space page updated link in the **NTS** space:
> 
> ```
> https://companysite.atlassian.net/wiki/spaces/NTS/calendars
> ```