- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Share same asset across multiple templates
Hi, It's a .net multipage application built on traditional CMS Crownpeak. There are different templates used for different pages. usually a template consists of input.aspx and output.aspx as common 2 files. I have assets created. Can assets be shared across templates. Can I access assets of template1 in template2 ? As of now all assets are being used for corresponding templates only. Please advise. I mean to say how can I access one content across multiple templates ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Based on your request it sounds as if you are attempting to read data from one asset into another.
To do this you need to load the asset using Asset.Load() (https://developer.crownpeak.com/Documentation/CMSAPI/Asset/Methods/Load(String).html)
Once you load the asset you can read the content directly from it as you would any other asset.
i.e. if you wanted to read the field "results" from a different asset with id 1234 you would use
Asset temp = Asset.Load(1234);
String field = temp["results"];
--
David Greenberg
Customer Support Engineer
## If Iโve helped, accept this response as a solution so that otherโs can find is more quickly in the future.
## Have thoughts on Crownpeak products? We'd love to hear them. Speak with the Crownpeak Product Team..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The link is giving 404 error
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Anjan,
Appologies, the link did not paste correctly:
https://developer.crownpeak.com/Documentation/CMSAPI/Asset/Methods/Load(String).html
--
David Greenberg
Customer Support Engineer
## If Iโve helped, accept this response as a solution so that otherโs can find is more quickly in the future.
## Have thoughts on Crownpeak products? We'd love to hear them. Speak with the Crownpeak Product Team..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
still it's giving 404 error
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Appologies https://developer.crownpeak.com/Documentation/CMSAPI/Asset/Methods/Load(String).html
--
David Greenberg
Customer Support Engineer
## If Iโve helped, accept this response as a solution so that otherโs can find is more quickly in the future.
## Have thoughts on Crownpeak products? We'd love to hear them. Speak with the Crownpeak Product Team..

