This is a simple and very useful code snippet which allows you to list all the FatWire sites on an App Server. This can be used in designing your own custom forms where you want the user to select the site from a list. The dynamic nature of this means that this list will grow with the sites and require no maintenance of code or picklists.
Firstly you are required to add the Publication tag Library using
<%@ taglib prefix="publication" uri="futuretense_cs/publication.tld" %>. This makes the functionality available using the publication prefix.
We use the tag publication:list to retrieve the list of sites and the list attribute takes the output variable name to assign the list to. In my example I am outputting this list in an html standard Ordered List <ol>. You can easily alter this code to output to a select statement or some other html set.
We then loop through the list created by passing the list name pubs into the listname attribute of the ics:listloop tag. We can then access a number of attribute of the site including the ID, Name and Description. You access these using ics:listget tag passing the name into listname attribute and the name of the field you want in the fieldname attribute. In this example I retrieve the ID and Name.
<%@ taglib prefix="publication" uri="futuretense_cs/publication.tld" %> <publication:list list="pubs"/> <ol> <ics:listloop listname="pubs"> <li> ID : <ics:listget listname="pubs" fieldname="id"/>, Name :<ics:listget listname="pubs" fieldname="name"/> </li> </ics:listloop> </ol>
I hope you found this useful or if you have any questions don't hesitate to leave a comment or contact support[@]tomred[.]net
I have spent most of my time working on these little bits of logic or snippets. These come from problems or issues I have encountered over the year. These are insights I have researched or provided as code review feedback.
During my time working in consulting I was tasked many times with delivering FatWire sites. I took notes due to the lack of useful documentation at the time. These are the results of those notes made and shared.
I believe the majority of time on a project is spent with the UI. Web is no exception. I have compiled a set of articles covering HTML, CSS and JS with the intention of taking the sting out of this work.
A space dedicated to all those things you need to know beyond writing code. This covers Linux, Windows, Git and SVN among other hopefully useful nuggets.
I picked up some pointers over the years consulting for government and banking sectors before entering a PCI DSS development environment. This section covers aspects like coding, testing, code review and best practice.
Apps is a section which offers access to bits and pieces I have put together over the last few years. This includes Random Password Generator and Base64 Encoder.