psmosser Posted September 5, 2013 Share Posted September 5, 2013 I need a rule to look at the "MagazineDescriptionField" for the word "PINK" and if it is there to change the color of a text resource. This is what I have so far. //Magazine Descripion Changes to Pink for Pink Edition and Red for Standard var MagDesc = CreateResource(Field("MagazineDescriptionField"), "plain text file", true); if (Field("CoverTemplate").indexOf("PINK") > -1) return MagDesc.content = '<span color= "M059-PinkIssue">' + MagDesc.content + '</span>'; else return MagDesc.content;This returns the resource but isn't changing the color. The log file states "Unknown Tag color="M059-Pink ignored. Unknown Tag ignored." What do I have wrong? Quote Link to comment Share on other sites More sharing options...
Dan Korn Posted September 5, 2013 Share Posted September 5, 2013 Instead of this: return MagDesc.content = '<span color= "M059-PinkIssue">' + MagDesc.content + '</span>'; You probably want to do this: return '<span color= "M059-PinkIssue">' + MagDesc.content + '</span>'; Quote Link to comment Share on other sites More sharing options...
psmosser Posted September 23, 2013 Author Share Posted September 23, 2013 Instead of this: return MagDesc.content = '<span color= "M059-PinkIssue">' + MagDesc.content + '</span>';You probably want to do this: return '<span color= "M059-PinkIssue">' + MagDesc.content + '</span>'; Thanks Dan. That did the trick. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.