traba5058 Posted June 25, 2013 Share Posted June 25, 2013 I am building a FusionPro letter template for use on MarcommCentral. The body of the letter is variable, so I need to adjust the closing to move to the correct position under the last line of the body copy. Ex: Sincerely, Signature Graphic Bob Smith Account Executive I've done this on XMPie, EFI's DSF and PageDNA but haven't had to do this in FusionPro yet. Is it possible? If so, can you point me in the right direction? Quote Link to comment Share on other sites More sharing options...
Dan Korn Posted June 25, 2013 Share Posted June 25, 2013 Take a look at the Cellphone Tutorial. It does exactly this, with an inline graphic. You can also refer to the section "Graphic Tag Inside Story Tag" in the Tags Reference Guide. Quote Link to comment Share on other sites More sharing options...
traba5058 Posted June 25, 2013 Author Share Posted June 25, 2013 Thanks so much! This is perfect. Quote Link to comment Share on other sites More sharing options...
traba5058 Posted June 25, 2013 Author Share Posted June 25, 2013 I created my rule and added it to my letter, but it isn't inserting the signature. When I created the rule, it validated successfully in the rule window. I also selected return as tagged text like it was in the cellphone tutorial. if (Field("AE Name")=="Andy Shulman") return "<graphic file=Andy Sig.pdf>"; else if (Field("AE Name")=="Ashley Smith") return "<graphic file="Ashley Sig.pdf>"; else if (Field("AE Name")=="Ben Wynett") return "<graphic file=Ben Sig.pdf>"; else if (Field("AE Name")=="Candice Wall") return "<graphic file=Candice Sig.pdf>"; else if (Field("AE Name")=="Fred Greer") return "<graphic file=Fred Sig.pdf>"; else if (Field("AE Name")=="Keith Tinsley") return "<graphic file=Keith Sig.pdf>"; else if (Field("AE Name")=="Laura Donnes") return "<graphic file=Laura Sig.pdf>"; else if (Field("AE Name")=="Linda Bishop") return "<graphic file=Linda Sig.pdf>"; else if (Field("AE Name")=="Mary Barton") return "<graphic file=Mary Sig.pdf>"; else if (Field("AE Name")=="Stan Evans") return "<graphic file=Stan Sig.pdf>"; else if (Field("AE Name")=="Steve McCart") return "<graphic file=Steve Sig.pdf>"; else if (Field("AE Name")=="Thomas Gable") return "<graphic file=Thomas Sig.pdf>"; Any thoughts? Quote Link to comment Share on other sites More sharing options...
Dan Korn Posted June 25, 2013 Share Posted June 25, 2013 I created my rule and added it to my letter, but it isn't inserting the signature. When I created the rule, it validated successfully in the rule window. I also selected return as tagged text like it was in the cellphone tutorial. if (Field("AE Name")=="Andy Shulman") return "<graphic file=Andy Sig.pdf>"; else if (Field("AE Name")=="Ashley Smith") return "<graphic file="Ashley Sig.pdf>"; // snip else if (Field("AE Name")=="Thomas Gable") return "<graphic file=Thomas Sig.pdf>";Any thoughts? Sorry, that cell phone job may not be the best example after all. Anyway, if you do a regular composition (not a Preview) and look at the log file, it probably has a big hint about what's wrong. I'll bet it says something like, "Graphic is not found or is not processed properly: Andy." Basically, if you're using any kind of tagged markup, and you have a tag (such as the <graphic> tag) with an attribute (such as "file"), and the attribute value has a space in it (such as "Andy Sig.pdf"), then you need to put the entire attribute value in quotes. So you want to do something like this instead: if (Field("AE Name")=="Andy Shulman") return '<graphic file="Andy Sig.pdf">'; //etc.But, instead of putting out the tags directly, you can just use the CreateResource function and let that figure out the tagging for you, like so: if (Field("AE Name")=="Andy Shulman") return CreateResource("Andy Sig.pdf", "graphic"); //etc.Also, the logic in the rule can be reduced quite a bit, since it seems that all you're doing is mapping the first name from the field to a graphic name. So the entire rule can be just this single line: return CreateResource(Field("AE Name").split(' ')[0] + " Sig.pdf", "graphic"); Quote Link to comment Share on other sites More sharing options...
traba5058 Posted June 26, 2013 Author Share Posted June 26, 2013 Thanks so much! I tried all 3 options and it still couldn't find the graphic when composed. So, I deleted all of my graphic resources, renamed them w/o the space, then used the last 1 line rule. It works! And, is so much simpler. I noticed when I composed that the signature is pretty big. When I use a graphic box, I obviously set the box dimensions and fit to the area. Can I do something similar this way? Like tell it to resize when it places it? Or should I just resize all of the resources? Thanks again for all of your help! Quote Link to comment Share on other sites More sharing options...
Dan Korn Posted June 26, 2013 Share Posted June 26, 2013 I noticed when I composed that the signature is pretty big. When I use a graphic box, I obviously set the box dimensions and fit to the area. Can I do something similar this way? Like tell it to resize when it places it? Or should I just resize all of the resources? Yes, you can control the size of the inline graphic. Again, I would refer you to the section "Graphic Tag Inside Story Tag" in the Tags Reference Guide. You do have to go back to using tags, something like this: return '<graphic file="' + Field("AE Name").split(' ')[0] + ' Sig.pdf" height=3600>'; 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.