#1
|
||||
|
||||
![]()
The <span> tag is a powerful feature of the FusionPro VDP products suite. Unfortunately, it's currently undocumented. This post attempts to remedy that shortcoming.
The <span> tag pair was designed to allow style overrides over a specific range, or span, of text. The initial, or opening, <span> tag can take several attributes, which specify style attributes to be overridden in the span. The overrides remain in effect until the ending, or closing, </span> tag is reached. The <span> tag can take any number of the following optional attributes:
Code:
<color name="Black">Hi <span><variable name="NameInColor"></span>, you're a winner!
__________________
Dan Korn FusionPro Developer / JavaScript Guru / Forum Moderator PTI Marketing Technologies | Printable | MarcomCentral I am a not a Support engineer, and this forum is not a substitute for Support. My participation on this forum is primarily as a fellow user (and a forum moderator). I am happy to provide help and answers to questions when I can; however, there is no guarantee that I, or anyone else on this forum, will be able to answer all questions or fix any problems. If I ask for files to clarify an issue, I might not be able to look at them personally. I am not able to answer private messages, emails, or phone calls unless they go through proper Support channels. Please direct any sales or pricing questions to your salesperson or inquiries@marcom.com. Complex template-building questions, as well as all installation and font questions or problems, should be directed to FusionProSupport@marcom.com. Paid consulting work may be required to fulfill your template-building needs. This is a publicly viewable forum. Please DO NOT post fonts, or other proprietary content, to this forum. Also, please DO NOT post any "live" data with real names, addresses, or any other personal, private, or confidential data. Please include the specific versions of FusionPro, Acrobat, and your operating system in any problem reports or help requests. I recommend putting this information in your forum signature. Please also check your composition log (.msg) file for relevant error or warning messages. Please post questions specific to the MarcomCentral Enterprise and Web-to-Print applications in the MarcomCentral forum. Click here to request access. Or contact your Business Relationship Manager (BRM/CPM) for assistance. Please direct any questions specific to EFI's Digital StoreFront (DSF) to EFI support. How To Ask Questions The Smart Way The correct spellings are JavaScript, FusionPro, and MarcomCentral (each with two capital letters and no spaces). Acceptable abbreviations are JS, FP, and MC (or MCC). There is no "S" at the end of "Expression" or "Printable"! The name of the product is FusionPro, not "Fusion". "Java" is not is not the same as JavaScript. Check out the JavaScript Guide and JavaScript Reference! FusionPro 8.0 and newer use JavaScript 1.7. Older versions use JavaScript 1.5. return "KbwbTdsjqu!spdlt\"".replace(/./g,function(w){return String.fromCharCode(w.charCodeAt()-1)}); ![]() Last edited by mhilger; April 10th, 2009 at 07:22 AM.. |
#2
|
||||
|
||||
![]()
Where are the places one could use the tag? Product templates? Custom P1 Copy in store options? Product descriptions or instructions?
|
#3
|
||||
|
||||
![]()
Hello Brian,
The <span> tag information that Dan is sharing here is specific to FusionPro VDP templates as opposed to FusionPro Web store display text.
__________________
--Mark Hilger |
#4
|
||||
|
||||
![]() Quote:
__________________
Dan Korn FusionPro Developer / JavaScript Guru / Forum Moderator PTI Marketing Technologies | Printable | MarcomCentral I am a not a Support engineer, and this forum is not a substitute for Support. My participation on this forum is primarily as a fellow user (and a forum moderator). I am happy to provide help and answers to questions when I can; however, there is no guarantee that I, or anyone else on this forum, will be able to answer all questions or fix any problems. If I ask for files to clarify an issue, I might not be able to look at them personally. I am not able to answer private messages, emails, or phone calls unless they go through proper Support channels. Please direct any sales or pricing questions to your salesperson or inquiries@marcom.com. Complex template-building questions, as well as all installation and font questions or problems, should be directed to FusionProSupport@marcom.com. Paid consulting work may be required to fulfill your template-building needs. This is a publicly viewable forum. Please DO NOT post fonts, or other proprietary content, to this forum. Also, please DO NOT post any "live" data with real names, addresses, or any other personal, private, or confidential data. Please include the specific versions of FusionPro, Acrobat, and your operating system in any problem reports or help requests. I recommend putting this information in your forum signature. Please also check your composition log (.msg) file for relevant error or warning messages. Please post questions specific to the MarcomCentral Enterprise and Web-to-Print applications in the MarcomCentral forum. Click here to request access. Or contact your Business Relationship Manager (BRM/CPM) for assistance. Please direct any questions specific to EFI's Digital StoreFront (DSF) to EFI support. How To Ask Questions The Smart Way The correct spellings are JavaScript, FusionPro, and MarcomCentral (each with two capital letters and no spaces). Acceptable abbreviations are JS, FP, and MC (or MCC). There is no "S" at the end of "Expression" or "Printable"! The name of the product is FusionPro, not "Fusion". "Java" is not is not the same as JavaScript. Check out the JavaScript Guide and JavaScript Reference! FusionPro 8.0 and newer use JavaScript 1.7. Older versions use JavaScript 1.5. return "KbwbTdsjqu!spdlt\"".replace(/./g,function(w){return String.fromCharCode(w.charCodeAt()-1)}); ![]() |
#5
|
|||
|
|||
![]()
Dan:
Thanks for this info. It is very helpful for some things that we are working on right now. I do one follow-up question, though. I don't understand the explanation for the accumulate=true attribute. I'm not sure what you mean by "taking into account any other changes within the span." Can you provide a example to clarify? Thanks, -- andy -- |
#6
|
||||
|
||||
![]() Quote:
Code:
return "Accumulate off:<t><span color=Red>Hi<color name=Green> there!</span> After span<br>\n" + "Accumulate ON:<t><span color=Red accumulate=true>Hi<color name=Green> there!</span> After span";
__________________
Dan Korn FusionPro Developer / JavaScript Guru / Forum Moderator PTI Marketing Technologies | Printable | MarcomCentral I am a not a Support engineer, and this forum is not a substitute for Support. My participation on this forum is primarily as a fellow user (and a forum moderator). I am happy to provide help and answers to questions when I can; however, there is no guarantee that I, or anyone else on this forum, will be able to answer all questions or fix any problems. If I ask for files to clarify an issue, I might not be able to look at them personally. I am not able to answer private messages, emails, or phone calls unless they go through proper Support channels. Please direct any sales or pricing questions to your salesperson or inquiries@marcom.com. Complex template-building questions, as well as all installation and font questions or problems, should be directed to FusionProSupport@marcom.com. Paid consulting work may be required to fulfill your template-building needs. This is a publicly viewable forum. Please DO NOT post fonts, or other proprietary content, to this forum. Also, please DO NOT post any "live" data with real names, addresses, or any other personal, private, or confidential data. Please include the specific versions of FusionPro, Acrobat, and your operating system in any problem reports or help requests. I recommend putting this information in your forum signature. Please also check your composition log (.msg) file for relevant error or warning messages. Please post questions specific to the MarcomCentral Enterprise and Web-to-Print applications in the MarcomCentral forum. Click here to request access. Or contact your Business Relationship Manager (BRM/CPM) for assistance. Please direct any questions specific to EFI's Digital StoreFront (DSF) to EFI support. How To Ask Questions The Smart Way The correct spellings are JavaScript, FusionPro, and MarcomCentral (each with two capital letters and no spaces). Acceptable abbreviations are JS, FP, and MC (or MCC). There is no "S" at the end of "Expression" or "Printable"! The name of the product is FusionPro, not "Fusion". "Java" is not is not the same as JavaScript. Check out the JavaScript Guide and JavaScript Reference! FusionPro 8.0 and newer use JavaScript 1.7. Older versions use JavaScript 1.5. return "KbwbTdsjqu!spdlt\"".replace(/./g,function(w){return String.fromCharCode(w.charCodeAt()-1)}); ![]() |
#7
|
|||
|
|||
![]()
Hi,
I have a business card which includes name and qualification. If the qualification is not present, just the name will be shown. The name and qualification need to be indifferent colours. This appears to be a job for <span> I have the following: if (Field("Qualification 1").length < 0) return < color name ="pantone 335 C"><span> Field("First name") +" " +Field("Last name");</span> else return <color name = "pantone 335C"> <span> Field("First name") + " " + Field("Last name")</span>+ "\n" <color name = "grey"> <span>+Field("Qualification 1")+" " + Field("Qualification 2")</span>; Which clearly doesn't work. Any pointers would be gratefully accepted.
__________________
FusionPro 9.0.3 Acrobat X 10.1.6 Mac OS Mountain Lion 10.8.3 FPExpression 3.1.13 |
#8
|
||||
|
||||
![]()
Your syntax is a little off. You need quotes around your tags and you're missing a couple of plus signs. And if you want to simplify a few things, you can just use the color tags, you don't need the span tags as well:
Code:
var result = '<color name ="pantone 335 C">' + Field("First name") + " " + Field("Last name") + '</color>'; result += (Field("Qualification 1") != "") ? '\n <color name = "grey">' + Field("Qualification 1") + " " + Field("Qualification 2") + '</color>' : ""; return result;
__________________
Ste Pennell FusionPro VDP Creator 9.3.15 Adobe Acrobat X 10.1.1 Mac OS X 10.12 |
#9
|
|||
|
|||
![]()
Thanks for this. I think I'm missing something though.
I get this returned: <color name ="pantone 335 C">Bruce Springsteen</color> <color name = "pantone 430 C">BSc Bcom</color>
__________________
FusionPro 9.0.3 Acrobat X 10.1.6 Mac OS Mountain Lion 10.8.3 FPExpression 3.1.13 |
![]() |
Tags |
markup, span, tags |
Thread Tools | Search this Thread |
Display Modes | |
|
|