Add customized attribute for a container

Hi Frnds,

 

Just want to know how can we add a new customized attribute to containter which can store position of that container.

 

<DCR>
  <Right postid="1">
    <Text>What is abc?</Text>
    <URL>http://www.google.com</URL>
  </Right>
  <Right postid="2">
    <Text>Can I buy abc?</Text>
    <URL>http://www.google.com</URL>
  </Right>
  <Right postid="3">
    <Text>How long abc valid for?</Text>
    <URL>http://www.google.com</URL>
  </Right>
</DCR>

 

Also can we disable the suffling of the container in DCR?

User should not be abe to move the container of the DCR up or down

 

Am using Teamsite 7.3.1 on windows.

 

Thanks in adv.

Comments

  • You can add attributes by having a field where the pathid="./@postid". I guess in this case, if you want it to store the container position, you'd want a hidden field and then use FormAPI's onSave event to populate the hidden fields. Not sure why you need that though, since whatever's using your DCR could get the same information with an XPath like /DCR/Right/position()

     

    And yes, it looks like you could disable the reordering of components by handling the onReplicantBeforeMove event and returning false.

TeamSite Developer Resources

  • Docker Automation

  • LiveSite Content Services (LSCS) REST API

  • Single Page Application (SPA) Modules

  • TeamSite Add-ons

If you are interested in gaining full access to the content, you can register for a My Support account here.
image
OpenText CE Products
TeamSite
APIs