Oracle WCS (Fatwire) · Technical

Fatwire – How to create new association with page asset


Fatwire initially provides some basic building assets, which we can use while setting up a site. Page, Query, Template, CSElement … is few of them.

Note: Fatwire treat every thing as asset (eg. Template)

Page asset is used to create site plan. We can define child parent relation ship within our site plan using page assets. It totally depends on our design how many level of hierarchy we will use. Its not possible to customize Fatwire provided assets (Page in our case), means we can’t introduce new attributes with these assets. But Fatwire provide a provision to create association. Using association, we can associate any asset type with our page asset.

I have divided this article in two parts:
1. How to create association with page asset
2. How to access associated assets

1. How to create association with page asset?

  • Login to system with admin rights
  • Go to Advance environment
  • Goto Admin > Asset Types > Page > Asset Associations
    Here we will find all association with page asset (see Figure 1)

    Figure 1 - Page associattions
    Figure 1 - Page associations
  • To create a new association, click on “Add New” and fill the form (see Figure 2)
    Figure 2 - Create new Association with Page asset
    Figure 2 - Create new Association with Page asset

    Name: Name of new association, please make it informative, we will be using this name to get the associated assets.
    Description: Description we want to provide. Can be same as name
    Child Asset: If we want to associate only specific asset type, then select that asset type from drop down. If any asset can be associated then leave it “Any”
    Page SubTypes: If we are using page subtypes and want this association with only some specific sub types, then select the sub type otherwise leave it “Any”
    Mirror Dependency Type: It’s a trade off and totally depends on business requirement. Select this value to Exact version if any change to the associated asset will require approval for publish of Page otherwise keep it Exists. I will suggest keeping it Exists.
    Multivalued Association: single valued / multivalued

  • Click “Add New Association” Button
  • We can find this new association on page creation form (eg. See Figure 3)

    Figure 3 - Page Creation Form with Associations
    Figure 3 - Page Creation Form with Associations

    NOTE: We can create number of associations with page assets

2. How to access associated assets?

We can use <asset:children … /> tag to get the associated assets. The syntax is as follows:

<asset:children type=”Page” assetid='<%=ics.GetVar(“pageId”) %>’ list=”myList” code=”associationName” order=”nrank” />

Description:

type: asset type, “Page” in our case
assetid: Page asset id
list: named list which will refer to the fetched assets. We will use this list to get the asset ids
code: Give the name of association (which we have created)
order: “nrank” to return an ordered list. Applicable in case of multivalued association only.

We can use “myList” to get the associated assets. This list has two attributes (otype, oid)

otype: type of associated asset
oid: id of associated asset

Iterate through the list:

// Check for empty list. Its a common practice to avoid any error. Please see Common errors and their Prevention
<ics:if condition='<%=null != ics.GetList(“myList”)&& ics.GetList(“myList”).hasData() %>’>
<ics:then>

<ics:listloop listname=”myList”>

<ics:listget listname=”myList” fieldname=”otype” output=”c” />
<ics:listget listname=”myList” fieldname=”oid” output=”cid” />

</ics:listloop>

</ics:then>
</ics:if>

Next Read :
Fatwire | How to create new Category with Page asset

Advertisements

8 thoughts on “Fatwire – How to create new association with page asset

  1. I am not sure why I do not see the Singlevalued function/multivalued fuction when I create a new association It seems to default to singlevalued association. Can you please tell where am going wrong?

    Thanks,
    Mallika

  2. @Mallika: Please confirm your fatwire version. I have used Fatwire 7 while writing this post. In case the problem persists then please get in touch with fatwire support on ips-link yahoo group.

  3. I am a beginner in fatwire and i am looking foward to learn website development using fatwire but i am not able to find any tutorials online.
    can u please share some tutorial with me, my mail id cijtin@gmail.com

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s