Skip to content
This repository has been archived by the owner on Dec 28, 2020. It is now read-only.

Generic templates not tied to a structure support #1

Open
pavelfomin opened this issue Oct 21, 2014 · 2 comments
Open

Generic templates not tied to a structure support #1

pavelfomin opened this issue Oct 21, 2014 · 2 comments
Assignees

Comments

@pavelfomin
Copy link

In Liferay 6.2, you have options for whether you want your template to be permanently linked to your structure. Generic templates are templates that are not tied to a structure, which allows for reusable code that can be imported into other templates.

A good example is the template for the Dynamic Data List. Currently, such template can be downloaded but the following error is thrown when trying to upload the changes: Template didn't match structure. (Error 5001).

What would it take to support the generic templates not tied to a structure?

@emiloberg
Copy link
Owner

A Template needs to be tied to a Structure. This is a known limitation of the current version of the DDM Tool. As you pointed out, it's not a Liferay limitation but a limitation of the Tool. When trying to figure out what kind of template we're dealing with, we're also looking a the structure. However, this logic is not set in stone and may be changed.

But, I'm a little bit puzzled. How have you managed to create a DDL Template which is not tied to a DDL structure (Data Definition)? If go to the Control Panel and click Dynamic Data List > Manage Data Definitions > Actions on a Data Definitions > Templates, those templates are tied to that Data Definition.

This be another bug. Is it a DDL forms or display template you're working with? Forms currently don't work, but it should be an easy fix to do it.

@emiloberg emiloberg self-assigned this Oct 23, 2014
@pavelfomin
Copy link
Author

Good point. I didn't realize that the display templates can be accessed via Manage Data Definitions -> Actions -> Templates. I've followed the liferay instructions and added the display template via Add Display Template option on the dynamic list from the site page. You are correct though the template is tied to the structure which is confirmed by Manage Data Definitions -> Actions -> Templates.Both the structure and the template are downloaded under dynamic_data_lists -> structures / templates but the subsequent upload fails with

Could not upload file!
mName:      undefined
mError:     Template didn't match structure. (Error 5001
mFile Path: /portal-ddm/dynamic_data_lists/templates/Product carousel template.ftl

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants