When I make my changes, all the site pages that load static content crash. For example:
Code: Select all
<cms:content contentType="Homepage Banner Ad" contentItemVar="item">
<a href="${item.targetUrl}"><img src="${item.imageUrl}" /></a>
</cms:content>
This code from a jsp works before my changes. Then I create the new type of static content:
Code: Select all
-- Create template
INSERT INTO BLC_SC_FLD_TMPLT(SC_FLD_TMPLT_ID, NAME) VALUES(3, 'Textblock Template');
-- Add HTML field to the template
INSERT INTO BLC_SC_FLDGRP_XREF(SC_FLD_TMPLT_ID, FLD_GROUP_ID, GROUP_ORDER) VALUES (3,1,0);
-- Create type
INSERT INTO BLC_SC_TYPE (SC_TYPE_ID, NAME, DESCRIPTION, SC_FLD_TMPLT_ID) VALUES (4, 'Textblock', NULL, 3);
And the code in jsp doesn't work anymore. The error message says that there isn't a "targetUrl" property. I don't understand why if I create a new static content type (not modifying an existing type but creating it), other types lose their properties.
Now, in the admin page, I can create static content using the new type "Textblock", and I can edit the HTML text in its "body" field. But I can't see the results in the site because it crashes when it tries to get any property like here:
Code: Select all
<cms:content contentType="Textblock" contentItemVar="item">
${item.body}
</cms:content>
Does anyone know how to fix this? How can I create a new type of static content without affecting other types?
Thanks.