掲示板

How to configure theme embedded SiteMap with custom ADT for all pages?

thumbnail
7年前 に Fernando Fernandez によって更新されました。

How to configure theme embedded SiteMap with custom ADT for all pages?

Expert 投稿: 396 参加年月日: 07/08/22 最新の投稿
Hi all,

I've embedded the Site Map portlet in my theme's portal_normal.vm and it's working OK.

#set ($VOID = $velocityPortletPreferences.setValue('portletSetupShowBorders', 'false'))
$theme.runtime("85_INSTANCE_FOOTER", "", $velocityPortletPreferences.toString())
#set ($VOID = $velocityPortletPreferences.reset())


I then created an ADT to change the Site Map output and it's working also OK.

My problem is that the embedded portlet, in some pages, doesn't use the ADT. I have to manually configure the portlet in that page to use the ADT.

I've thought this might be caused by some records in the PortletPreferences table but I've checked and there's no records there about this config.

Any ideas?

TIA

Fernando
thumbnail
7年前 に Travis Cory によって更新されました。

RE: How to configure theme embedded SiteMap with custom ADT for all pages?

Junior Member 投稿: 73 参加年月日: 13/06/04 最新の投稿
Hi Fernando,

Are you importing the ADT with the theme via the resources importer? If so you may be able to do this in the same way you can set the ADT in the sitemap.json

"portletPreferences": {
	"displayStyle": "ddmTemplate_TEMPLATE-NAME-ALL-CAPS-NO-SPACES",
	"displayStyleGroupId": "${groupId}",
}


you can try setting in the portal_normal.vm using


#set ($VOID = $velocityPortletPreferences.setValue('displayStyle', 'ddmTemplate_TEMPLATE-NAME-ALL-CAPS-NO-SPACES'))
#set ($VOID = $velocityPortletPreferences.setValue('displayStyleGroupId', '$groupId'))
thumbnail
7年前 に Fernando Fernandez によって更新されました。

RE: How to configure theme embedded SiteMap with custom ADT for all pages?

Expert 投稿: 396 参加年月日: 07/08/22 最新の投稿
Hi Travis,

Thanks for your help. I'm not using resource-importer, just changing the theme template and the ADT is manually inserted.

I'm not able to make it work exactly like you wrote.

My template name is "SiteMapCust" and I tried

#set ($VOID = $velocityPortletPreferences.setValue('displayStyle', 'ddmTemplate_SITEMAPCUST'))


But it only worked with the id:


#set ($VOID = $velocityPortletPreferences.setValue('displayStyle', 'ddmTemplate_cbe3bd92-354f-41e9-ac6f-6ba1b09cf642'))


Although this works, it's not very practical, if you have to export/import the site.

Any ideas why the name doesn't work? Anything to do with language settings, perhaps?

Also, I had to change $groupId to $group_id.

Thanks

Fernando
thumbnail
7年前 に Travis Cory によって更新されました。

RE: How to configure theme embedded SiteMap with custom ADT for all pages?

Junior Member 投稿: 73 参加年月日: 13/06/04 最新の投稿
When creating the ADT through the UI, the id stored is random, which doesn't make it possible to export and import. I believe if you use the resources importer the ID is set to the name of the ADT itself.
thumbnail
7年前 に Fernando Fernandez によって更新されました。

RE: How to configure theme embedded SiteMap with custom ADT for all pages?

Expert 投稿: 396 参加年月日: 07/08/22 最新の投稿
Thanks Travis, I'll have to go and study the Resource Importer, then. :-)

Cheers

Fernando