EASYProcess Custom HTML Tags

This forum allows users to post and respond to "How Do I Do ....." questions. The information contained in this forum has not been validated by K-Rise Systems and, as such, K-Rise Systems cannot guarantee the accuracy of the information.
SteveCap
Posts: 329
Joined: August 26th, 2021, 9:18 am
Contact:

EASYProcess Custom HTML Tags

Unread post by SteveCap »

  • EASYProcess Scripting Tags
    • <Loop Node=”{NodePath}”>{InnerHtml}</Loop>
      • Will duplicate the {InnerHtml}l for the amount of nodes it finds with its {NodePath}
      • {NodePath} must be a valid path from the model work data xml
      • See Example Below
    • <EP_IfFirstNode>{InnerHtml}</EP_IfFirstNode>
      • Can Only Be using inside a Loop tag
      • If it is the first node in the loop the {InnerHtml} will be added to the page otherwise it will be removed
    • <EP_IfNotFirstNode></EP_IfNotFirstNode>
      • Can Only Be using inside a Loop tag
      • If it is not the first node in the loop the {InnerHtml} will be added to the page otherwise it will be removed
    • <EP_IFLastNode></EP_IFLastNode>
      • Can Only Be using inside a Loop tag
      • If it is the last node in the loop the {InnerHtml} will be added to the page otherwise it will be removed
    • <EP_IfNotLastNode></EP_IfNotLastNode>
      • Can Only Be using inside a Loop tag
      • If it is not the last node in the loop the {InnerHtml} will be added to the page
    • <EP_IFTrue Node="{NodePath}">{InnerHtml}</EP_IFTrue>
      • If the {NodePath} evaluates to true or yes the {InnerHtml} will be added to the page otherwise it will be removed
    • <EP_IfTrueOr Node1="{NodePath1}" Node2="{NodePath2}">{InnerHtml}</EP_IFTrue>
      • If the {NodePath1} or {NodePath2} evaluates to true or yes the {InnerHtml} will be added to the page otherwise it will be removed
    • <EP_IfTrueAnd Node1="{NodePath1}" Node2="{NodePath2}">{InnerHtml}</EP_IfTrueAnd>
      • If the {NodePath1} and {NodePath2} evaluates to true or yes the {InnerHtml} will be added to the page otherwise it will be removed
    • <EP_IFFalse Node="{NodePath}">{InnerHtml}</EP_IFFalse>
      • If the {NodePath} evaluates to false or nothe {InnerHtml} will be added to the page otherwise it will be removed
    • <EP_IfFalseOr Node1="{NodePath1}" Node2="{NodePath2}">{InnerHtml}</EP_IfFalseOr>
      • If the {NodePath1} or {NodePath2} evaluates to false or no the {InnerHtml} will be added to the page otherwise it will be removed
    • <EP_IfFalseAnd Node1="{NodePath1}" Node2="{NodePath2}">{InnerHtml}</EP_IfFalseAnd>
      • If the {NodePath1} and {NodePath2} evaluates to false or no the {InnerHtml} will be added to the page otherwise it will be removed
    • <EPTranslate>{InnerText}</EPTranslate>
      • The {InnerText} will be translated if languages are set up. See work with Languages.
    • <EP_IfDesktop>{InnerHtml}</EP_IfDesktop>
      • If the device is a desktop the {InnerHtml} will be added to the page otherwise it will be removed
    • <EP_IfNotDesktop>{InnerHtml}</EP_IfNotDesktop>
      • If the device is not a desktop the {InnerHtml} will be added to the page otherwise it will be removed
    • <EP_IfPhone>{InnerHtml}</EP_IfPhone>
      • If the device is a phone the {InnerHtml} will be added to the page otherwise it will be removed
    • <EP_IfNotPhone>{InnerHtml}</EP_IfNotPhone>
      • If the device is not a phone the {InnerHtml} will be added to the page otherwise it will be removed
    • <EP_If>{InnerHtml}</EP_If>
      • {Expression} should be parenthesis containing two integeres comma sepeaterd (1,1) or math expressions (EPAdd(1,2),EPMinus(4-1))
      • expressions can be nested
      • Math Expressions
        • EPRemainder: EPRemainder(5,3) = 2
        • EPAdd: EPAdd(1,2) = 3
        • EPMinus: EPMinus(4,1) = 3
        • EPDivide: EPDivide(4,2) = 2
        • EPMultiply: EPMultiply(4,2) = 8
      • <EP_If Equal="{Expression}">{InnerHtml}</EP_IfNotPhone>
        • If the {Expression} evaluates to true the {InnerHtml} will be added to the page otherwise it will be removed. (1,2) = false
      • <EP_If NotEqual="{Expression}">{InnerHtml}</EP_IfNotPhone>
        • If the {Expression} evaluates to true the {InnerHtml} will be added to the page otherwise it will be removed. (1,2) = true
      • <EP_If GreaterThan="{Expression}">{InnerHtml}</EP_IfNotPhone>
        • If the {Expression} evaluates to true the {InnerHtml} will be added to the page otherwise it will be removed. (1,2) = false
      • <EP_If LessThan="{Expression}">{InnerHtml}</EP_IfNotPhone>
        • If the {Expression} evaluates to true the {InnerHtml} will be added to the page otherwise it will be removed. (1,2) = true
  • EASYProcess Variable
        • Model_Data({NodePath})
        • Model_Data({NodePath},{TranslateNodePath})
        • {NodePath} must be a valid path from the model work data xml
        • {TranslateNodePath} must be a valid path from the model work data xml or static value
        • Will replace this variable with the {NodePath} value from the Model WorkData Xml if {TranslateNodePath} is true or yes it will translate the value
        • Content_Model_Data({NodePath})
        • Content_Model_Data({NodePath},{TranslateNodePath})
        • Same as Model_Data({NodePath}) expect it will look for the {NodePath} in the pages parent template model instead of its own.
    • System_Data({Value})
      • Valid Values Are
        • PlatfromUrl
          • This will return the base url of the platform
            • AppUrl
            • ApplicationUrl
            • Both of these will return the base url of the application
              • AppUrl = ApplicationUrl = PlatformUrl + “{TenantName}_{ApplicationName}/”
            • AppFileUrl
            • ApplicationFileUrl
            • Both of these will return the url to the apps static files
              • Use this to access your static files
                • If your static file has a relative path of Imgs/1_1.jpg access it adding <img src="System_Data(AppFileUrl)Imgs/1_1.jpg"/>
                • AppFileUrl = ApplicationFileUrl = PlatfromUrl + “Applications/{ApplicationId}/”
        • Version
          • Get the Website configuration FileVersion variable value
            • Use this when including files. When making a change to the file update the config variable value to force browsers to re get the file <script src="System_Data(AppFileUrl)JS/MyJS.js?V=System_Data(Version)"/>
        • Title
          • Title returns the tile of the page
            • <Title>System_Data(Title)</Titile>
    • Loop_Data({Value})
      • Valid Values Are
        • Index
          • Returns the index of the loop iteration
          • Starts at 0
        • Position
          • Returns the position of the loop iteration
          • Starts at 1
        • Count
          • Returns the number of total iterations the loop will have
    • EP_Params
      • Takes in a list of query strings. Encrypts them and returns the encrypted string
      • Should Be a name value list.
        • Name and values are separated by #EPNV#
          • = is #EPNV#
        • Query strings separated by #EPQS#
          • & is #EPQS#
        • Example string
          • QS1=One&QS2=Two
          • To get the encrypted string of the above use <a href=OrderDetails?EP_Params(QS1#EPNV#One#EPQS#QS2#EPNV#Two)>Order Details</a>
  • Sample Work Data

    Code: Select all

    		<WorkData>
    			<Items>
    				<Item>
    					<ItemNumber>1</ItemNumber>
    					<Description>ItemOneDescription</Description>
    					<ItemPrice>$1</ItemPrice>
    					<Images>
    						<Image>
    							<Url>ProductImages/1_1.jpg</Url>
    						</Image>
    						<Image>
    							<Url>ProductImages/1_2.jpg</Url>
    						</Image>
    						<Image>
    							<Url>ProductImages/1_3.jpg</Url>
    						</Image>
    					</Images>
    				</Item>
    				<Item>
    					<ItemNumber>2</ItemNumber>
    					<Description>ItemTwoDescription</Description>
    					<ItemPrice>$2</ItemPrice>
    					<Images>
    						<Image>
    							<Url>ProductImages/2_1.jpg</Url>
    						</Image>
    						<Image>
    							<Url>ProductImages/2_2.jpg</Url>
    						</Image>
    					</Images>
    				</Item>
    			</Items>
    			<ItemImages>
    				<Images>
    					<Image>
    						<ItemNumber>1</ItemNumber>
    						<Url>ProductImages/1_1.jpg</Url>
    					</Image>
    					<Image>
    						<ItemNumber>1</ItemNumber>
    						<Url>ProductImages/1_2.jpg</Url>
    					</Image>
    					<Image>
    						<ItemNumber>1</ItemNumber>
    						<Url>ProductImages/1_3.jpg</Url>
    					</Image>
    					<Image>
    						<ItemNumber>2</ItemNumber>
    						<Url>ProductImages/2_1.jpg</Url>
    					</Image>
    					<Image>
    						<ItemNumber>2</ItemNumber>
    						<Url>ProductImages/2_2.jpg</Url>
    					</Image>
    				</Images>
    			</ItemImages>
    			<Variable>
    				<Yes>True</Yes>
    				<No>False</No>
    			</Variable>
    		</WorkData>
    	
    There are two main ways to have a loop inside of a loop. The sample work data xml above has data structured for both ways. Both these examples will return the same html
    • Option 1
      • Data has child that you can loop one

        Code: Select all

        				<html>
        					...
        						<Loop Node="WorkData/Items/Item">
        							<div>
        								<h4>Model_Data(WorkData/Items/Item/ItemNumber)</h4>
        								<p>Model_Data(WorkData/Items/Item/Description)</p>
        								<div>Model_Data(WorkData/Items/Item/ItemPrice)</div>
        								<EP_IfFirstNode>There are Loop_Data(Count) nodes</EP_IfFirstNode>
        								<EP_IFTrue Node="WorkData/Variable/Yes">This is true</EP_IFTrue>
        								<EP_IFTrue Node="WorkData/Variable/No">This is is false</EP_IFTrue>
        								this is index: Loop_Data(Index)
        								this is position: Loop_Data(Position)
        								<EP_IFNotLastNode>This is not the last node</EP_IFLastNode>
        								<div>
        									<Loop Node="WorkData/Items/Item/Images/Image">
        										<img src="System_Data(AppFileUrl)Model_Data(WorkData/Items/Item/Images/Image/Url)"/>
        									</Loop>
        								</div>
        								<a href="ItemDetails?EP_Params(ItemNumber#EPNV#)Model_Data(WorkData/Items/Item/ItemNumber)">Item Details</a>
        							</div>
        						</Loop>
        					...
        				<html>
        			
    • Option 2
      • Data is on the same level as parent loop and using a node in the parent loop as a key

        Code: Select all

        				<html>
        					...
        						<Loop Node="WorkData/Items/Item">
        							<div>
        								<h4>Model_Data(WorkData/Items/Item/ItemNumber)</h4>
        								<p>Model_Data(WorkData/Items/Item/Description)</p>
        								<div>Model_Data(WorkData/Items/Item/ItemPrice)</div>
        								<EP_IfFirstNode>There are Loop_Data(Count) nodes</EP_IfFirstNode>
        								<EP_IFTrue Node="WorkData/Variable/Yes">This is true</EP_IFTrue>
        								<EP_IFTrue Node="WorkData/Variable/No">This is is false</EP_IFTrue>
        								this is index: Loop_Data(Index)
        								this is position: Loop_Data(Position)
        								<div>
        									<Loop Node="WorkData/ItemImages/Images/Image[ItemNumber='Model_Data(WorkData/Items/Item/ItemNumber)']">
        										<div>
        											<EP_IFNotLastNode>This is not the last node</EP_IFLastNode>
        											<img src="System_Data(AppFileUrl)Model_Data(WorkData/ItemImages/Images/Image/Url)"/>
        										</div>
        									</Loop>
        								</div>
        								<a href="ItemDetails?EP_Params(ItemNumber#EPNV#)Model_Data(WorkData/Items/Item/ItemNumber)">Item Details</a>
        							</div>
        						</Loop>
        					...
        				<html>
        			
    Both of these examples would return html as

    Code: Select all

    		<html>
    			...
    				<div>
    					<h4>1</h4>
    					<p>ItemOneDescription</p>
    					<div>$1</div>
    					There are 2 nodes
    					This is true
    					this is index: 0
    					this is position: 1
    					<div>
    						<div>
    							This is not the last node
    							<img src="https://easyprocess.krisesystems.com/Product_DV/Applications/3108/ProductImages/1_1.jpg"/>
    						</div>
    						<div>
    							This is not the last node
    							<img src="https://easyprocess.krisesystems.com/Product_DV/Applications/3108/ProductImages/1_2.jpg"/>
    						</div>
    						<div>
    							<img src="https://easyprocess.krisesystems.com/Product_DV/Applications/3108/ProductImages/1_3.jpg"/>
    						</div>
    					</div>
    					<a href="ItemDetails?ep_param=1ylOMMnQz-d1z41TDcNG5Fa21jlnllUrzCSZIkhwEiy0">Item Details</a>
    				</div>
    				<div>
    					<h4>2</h4>
    					<p>ItemTwoDescription</p>
    					<div>$2</div>
    					This is true
    					this is index: 1
    					this is position: 2
    					<div>
    						<div>
    							This is not the last node
    							<img src="https://easyprocess.krisesystems.com/Product_DV/Applications/3108/ProductImages/2_1.jpg"/>
    						</div>
    						<div>
    							<img src="https://easyprocess.krisesystems.com/Product_DV/Applications/3108/ProductImages/2_2.jpg"/>
    						</div>
    					</div>
    					<a href="ItemDetails?ep_param=uKsV2CahGlP88kz4cHmxEQ%3d%3d">Item Details</a>
    				</div>
    			...
    		<html>
    	
Attachments
EASYProcessCustomHTMLTagsBBCode.txt
EASYProcess Custom HTML Tags Post BBCode
(13.58 KiB) Downloaded 149 times
EASYProcessCustomHTMLTagsBBCode.txt
EASYProcess Custom HTML Tags Post BBCode
(13.58 KiB) Downloaded 149 times
word count: 1644

Tags:
Post Reply