Hi there,
I have already found several Threads on embedding WebContentDisplay into a theme but none of them solve my problem.
Here's the basic setup. I have embedded WebContentDisplay Portlets into my theme with the following commands
1
2 $velocityPortletPreferences.setValue("portlet-setup-show-borders","false")
3 $velocityPortletPreferences.setValue("group-id", "$group_id")
4 $theme.runtime("56_INSTANCE_1851somespecialId", "", $velocityPortletPreferences.toString())
5 #set ($VOID = $velocityPortletPreferences.reset())
to get a layout like this

so people can edit it to something like this.

The footer should be the same on every page. simple stuff.
Of course, what I could do now is to create some articles set their article IDs in velocityPortletPreferences in my theme and I'd be all set.
The only problem now is that with the way we use liferay there will be dynamically created community sites in the future and I will not know the articleIds.
Now if I don't specify an articleId in the theme, the WebContentDisplays will be separate instances on every page and not automatically share their content. One would have to set the content on every page manually and again whenever a new page gets created.
On the other hand, If I do specify an articleId, there will be the message "The selected web content no longer exists." and I cannot edit, only create new content but then the problem is the same as above.
I hope I could convey my problem clearly. What could I do?
Please sign in to flag this as inappropriate.