Generate inline link

I am making web service calls to generate pages. I am able to create page content items thru the API. However, I have a need to generate inline links for other content items/ pages in the body of the pages. Is there any such API where you can pass possibly the content id, and the template id, and the inline link gets generated?


You can do this using a separate “Context” in publishing design. The context is just a collection of location schemes. Normally you have a context that defines the published location of pages / files. You also often have the Assembly context (Site Folder Assembly by default). This is used to define how the link is rendered in the page. Often these two match, or the Site Folder Assembly just adds the domain to the link for cross site links. There is nothing stopping you have a totally separate context that generates links Percussion does not actually know about based upon information in the item. When you assembly the page through the api, just specify the context you want to be used to generate those links. Some people publish out content through database publishing and create an assembly location scheme that does not even reflect the items path in percussion e.g. it might be something like . where 1234 could be the content id or another field value on the item.

You may just be assembling with the publish context i(1) nstead of the Assembly Context. Check the correct assembly context by looking at the edition in Publishing design, an assembly context is assigned for each content list in a edition. Click on Contexts in the left navigation to find the id for that context, then make sure you pass that id when assembling.

Just remember if you are assembling pages like this through the api, you are bypassing the decoupled delivery mechanism of the product. You have to make sure you know if the item you are assembled should be public or not. If the server is down, the call will not be available and whatever is relying on it may break. You need to make sure you do not overload the system with too many calls to assemble. Most of the time we suggest using the publishing itself to deliver this content either into a database through database publising, to html or xml files on the filesystem. This way the system remains decoupled and the current data is always available to the external system through the files or separate database.


Are you wanting inline link code similar to what is generated when you use Ephox to insert an Inline Link to a content item? I don’t recall an API endpoint that will generate an inline link. You may look at the code from the PSOBatchImporter (Available on github: that demonstrates how inline link code is generated. It isn’t as pretty as passing a content id and template id, but it does get the job done.

Thanks…for the help