Posts Tagged ‘Part 2’


IMPORTANT TAGS IN FATWIRE (Continuation):

In this article, we are going to discuss the PROGRAMMING CONSTRUCT TAGS IN FATWIRE. Lets start..!

IF/THEN/ELSE:

This is one of the most common tag used by the object oriented programmers. The working of the construct is similar to that of other language constructs (like java,c, c++,etc). However, it has a different syntax compared to others. Lets see the syntax.

JSP Syntax:

<ics:if condition=”logical expression”>
<ics:then>
tags or text
</ics:then>
<ics:else>
tags or text
</ics:else>
</ics:if>

XML Syntax:

<IF COND=”LOGICAL_EXPRESSION”>
<THEN>
tags or text
</THEN>
<ELSE>
tags or text
</ELSE>
</IF>

Example:

<ics:if condition='<%=ics.GetList(“a:mypage”) == null%>’>
<ics:then>
No values available for this attribute
</ics:then>
<ics:else>
<ics:listloop listname=”a:mypage”>
<ics:listget listname=”a:mypage” fieldname=”value” output=”mypage_id”/>
</ics:listloop>
</ics:else>
</ics:if>

LOOP:

This is the looping construct of FATWIRE. This tag is used to iterate through items in a list. Remember that excess code within these tags affects the performance of the template. Lets see the syntax.

JSP Syntax:

<ics:listloop   listname=”some list” [maxrows=”number of loops”] [startrow=”start row”] [endrow=”end row”]/>

XML Syntax:

<LOOP [FROM=”START”] [COUNT=”LOOP_TIMES”] [LIST=”LIST_NAME”] [UNTIL=”END”]>

</LOOP>

Example:

<ics:listloop listname=”a:mypage”>
<ics:listget listname=”a:mypage” fieldname=”value” output=”mypage_id”/>
</ics:listloop>

We will see the TAGS THAT LOG DEPENDENCIES in the upcoming posts..

Stay tuned…


In my previous post, we have seen the creation of Static Publishing destination. In this post, and if required in the upcoming posts, we will discuss on how to work with this static publishing.

Static Publishing or Export to Disk Publishing, as quoted by the Fatwire Developer guide, “It renders your approved assets into static HTML files, using the template elements assigned to them to format them. An administrator or automated process then copies those files to your delivery system using FTP or another file transfer method.”

The Static Publishing is mainly used when the Basic Asset Model is used. While using the Flex Asset model, it rarely makes sense to use this Static Publishing methodology.

APPROVING THE ASSETS:

After the asset is created (lets take a PAGE asset here) , and a default template is assigned, we need to APPROVE the asset for making it available for PUBLISH.

To approve an asset, click on INSPECT action item of the asset (a Page here). Then click on MORE drop down list, and then click on “APPROVE FOR PUBLISH”. Check the below screen for the same.

image

Now, The next step to proceed with is to select the Publishing destination(If not created earlier, check out this link for creation of Static Publishing Destination). Select the appropriate publishing destination, if you have created more than one. Then click on the Approve button. Check the below screen for the same.

image

If the asset has any dependencies, those dependencies have to be approved first, before approving this asset.

That’s it.. The asset is Approved.

SETTING STATUS OF ASSETS:

If the assets are published directly, with out setting a specified file name, they will be exported with the ASSET’S ID by default. To avoid that, we need to specify a user friendly name. The STATUS screen helps us in setting a user friendly name for the asset, path for the asset (under the exported directory), and a starting point for the asset.

For setting the status, click on STATUS option of the MORE drop down menu. Then the following screen appears. Click on the “SPECIFY PATH/FILENAME, START POINTS” link in the appropriate publishing destination.

image

The next screen is the place where we need to set the above discussed (Path, File name, Starting points).

  1. Specify the Path and filename.
  2. If the asset needs to be published, it needs to be a starting point.  For example, if Page is a starting point, then the all the images, css, etc will automatically be exported by the page.
  3. Select the template and the wrapper page.
  4. Click on Save.

Check the below screen for the same.

image

PUBLISHING THE ASSETS:

Now, the final thing to do is to publish the assets. Click on the PUBLISHING option in the top of the work area. The following screen appears. Select the appropriate publishing destination. Check the below screen for the same.

image

The following screen appears next.  In that, we need to click on PUBLISH button.

image

To make sure that the files are exported correctly, we need to go to the export location, and check whether they are exported properly or not.

image

In this way, the  assets are exported successfully to the specified location.

This is STATIC PUBLISHING or EXPORT TO DISK PUBLISHING.

Stay tuned for more posts…