Jump to content

Color resource based on contents of field


psmosser

Recommended Posts

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?

Link to comment
Share on other sites

  • 3 weeks later...

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...