Ett ögonblick, laddar all data
Fel uppstod under bearbetning av mallen.
Expression entry.publishDate is undefined on line 18, column 34 in 1712101#1712139#1715217.
1<script> 
2	<@assetPublisherEntriesToJSON jsArrayName='dataDrugs' entries=entries locale=locale dateFormat="d MMMM yyyy" /> 
3</script> 
4 
5 
6<#macro assetPublisherEntriesToJSON jsArrayName entries locale dateFormat> 
7	<#assign uniqueCategories = [] /> 
8	${jsArrayName} = { 
9	entries: [	 
10	<#list entries as entry> 
11		<#assign docXml = saxReaderUtil.read(entry.getAssetRenderer().getArticle().getContentByLocale(locale) ) /> 
12		<#assign assetRenderer = entry.getAssetRenderer() /> 
13		<#assign viewURL = assetPublisherHelper.getAssetViewURL(renderRequest, renderResponse, entry) /> 
14		<#assign viewURL = assetRenderer.getURLViewInContext(renderRequest, renderResponse, viewURL) /> 
15
16		_index: ${entry_index}, 
17		_title: "${entry.getTitle(locale)}", 
18		_publishDate: "${entry.publishDate?datetime?string(dateFormat)}", 
19		_entryId: ${entry.entryId}, 
20		_viewURL: "${viewURL}", 
21		_categories: [ 
22		<#list entry.getCategories() as category > 
23			<#if (uniqueCategories?seq_contains(category.getTitle(locale)?js_string) == false ) > 
24				<#assign uniqueCategories = uniqueCategories + [ category.getTitle(locale)?js_string ] /> 
25			</#if> 
26			"${category.getTitle(locale)?js_string}" 
27			<#if category_has_next>,</#if> 
28		</#list> 
29		], 
30		<@_assetPublisherEntriesToJSONFunc nodeStart = docXml.selectNodes("//root/*") /> 
31
32		<#if entry_has_next>,</#if> 
33	</#list> 
34	], 
35	meta: { 
36		categories: [ 
37			<#list uniqueCategories as cat > 
38				"${cat}" 
39				<#if cat_has_next>,</#if> 
40			</#list> 
41
42
43	}; 
44</#macro> 
45 
46<#macro _assetPublisherEntriesToJSONFunc nodeStart> 
47	<#local prevName = '' /> 
48	<#list nodeStart as node> 
49			<#local nodes2 = node.selectNodes("dynamic-element") /> 
50			<#if (prevName == node.valueOf("@name"))> 
51
52			<#else> 
53				<#if prevName != ''>],</#if> 
54				${node.valueOf("@name")?js_string}: [ 
55			</#if> 
56			<#local prevName = node.valueOf("@name")/> 
57
58			fieldValue: "${node.valueOf("dynamic-content/text()")?js_string}" 
59			<#if nodes2?has_content>,<@_assetPublisherEntriesToJSONFunc nodeStart = nodes2 /></#if> 
60
61			<#if !node_has_next>]</#if> 
62	</#list> 
63</#macro> 
Fel uppstod under bearbetning av mallen.
Expression entry.publishDate is undefined on line 17, column 34 in 1712101#1712139#1715223.
1<script> 
2	<@assetPublisherEntriesToJSON jsArrayName='dataResources' entries=entries locale=locale dateFormat="d MMMM yyyy" /> 
3</script> 
4 
5<#macro assetPublisherEntriesToJSON jsArrayName entries locale dateFormat> 
6	<#assign uniqueCategories = [] /> 
7	${jsArrayName} = { 
8	entries: [	 
9	<#list entries as entry> 
10		<#assign docXml = saxReaderUtil.read(entry.getAssetRenderer().getArticle().getContentByLocale(locale) ) /> 
11		<#assign assetRenderer = entry.getAssetRenderer() /> 
12		<#assign viewURL = assetPublisherHelper.getAssetViewURL(renderRequest, renderResponse, entry) /> 
13		<#assign viewURL = assetRenderer.getURLViewInContext(renderRequest, renderResponse, viewURL) /> 
14
15		_index: ${entry_index}, 
16		_title: "${entry.getTitle(locale)}", 
17		_publishDate: "${entry.publishDate?datetime?string(dateFormat)}", 
18		_entryId: ${entry.entryId}, 
19		_viewURL: "${viewURL}", 
20		_categories: [ 
21		<#list entry.getCategories() as category > 
22			<#if (uniqueCategories?seq_contains(category.getTitle(locale)?js_string) == false ) > 
23				<#assign uniqueCategories = uniqueCategories + [ category.getTitle(locale)?js_string ] /> 
24			</#if> 
25			"${category.getTitle(locale)?js_string}" 
26			<#if category_has_next>,</#if> 
27		</#list> 
28		], 
29		<@_assetPublisherEntriesToJSONFunc nodeStart = docXml.selectNodes("//root/*") /> 
30
31		<#if entry_has_next>,</#if> 
32	</#list> 
33	], 
34	meta: { 
35		categories: [ 
36			<#list uniqueCategories as cat > 
37				"${cat}" 
38				<#if cat_has_next>,</#if> 
39			</#list> 
40
41
42	}; 
43</#macro> 
44 
45<#macro _assetPublisherEntriesToJSONFunc nodeStart> 
46	<#local prevName = '' /> 
47	<#list nodeStart as node> 
48			<#local nodes2 = node.selectNodes("dynamic-element") /> 
49			<#if (prevName == node.valueOf("@name"))> 
50
51			<#else> 
52				<#if prevName != ''>],</#if> 
53				${node.valueOf("@name")?js_string}: [ 
54			</#if> 
55			<#local prevName = node.valueOf("@name")/> 
56
57			fieldValue: "${node.valueOf("dynamic-content/text()")?js_string}" 
58			<#if nodes2?has_content>,<@_assetPublisherEntriesToJSONFunc nodeStart = nodes2 /></#if> 
59
60			<#if !node_has_next>]</#if> 
61	</#list> 
62</#macro> 
Nod: vgas1058.vgregion.se:-1