Wiki Display of Entries
 
Section 5.2: Wiki Display of Entries
Normally in a wiki a link to another page is of the form:
[[Page name]]
In RAMADDA you can use the name of another entry to create the link. You can use the Add entry link menu to select an entry. This produces wiki text of the form:
[[entry id|Label to show for link]]
e.g.:
[[7ca13e52-8efb-4d17-863f-e17027dbcc22|Earthquake data]]
You can also just specify an entry by name. Either an absolute path:
[[Top entry/Some other entry]]
Or relative to the wiki entry:
[[Some entry]]
You can also set the output type for an entry using the hashtag (#) symbol after the entry id:
[[7ca13e52-8efb-4d17-863f-e17027dbcc22#html.table|Earthquake data as a table]]
which will override the default display. If the entry with the given name does not exist then the link will take one to the create entry form. You can also import content from the current Wiki Page entry or any other entry with the import syntax:
{{<property>  <name="value" pairs>}}
e.g., if we wanted to show the information tabs for an entry we'd do:
{{information}}
For example, if we want to import the information block with it open:
{{information open="true"}}
This would give us:
images/wikiinformation.png
Normally, all property tags refer to the current entry. However, another entry can be specified with the "entry" attribute, e.g:
{{information entry="some other entry id or name or 'parent' or 'grandparent'"}}
The entry value can be:

  • The ID of an entry

  • Its full path, e.g., /Top/.../entry_name

  • The parent entry - "parent"

  • The parent of the parent entry -"grandparent"

  • The entry itself - "this"

  • An entry linked to the entry. Either "link" to find the first one or to specify an entry type use "link:entry_type"
The Add Entry ID menu in the editor toolbar allows you to select the entry to use. As a convenience this adds both the ID of the entry as well as its name. The property tag supports defining an attribute property that is shared by all tags in the page.
{{property "some name"="some value" "some other name"="some other value"}}
For example, if you are creating a wiki page full of charts (e.g., here) that refer to another point data entry for their data then you use the property like, e.g.:
{{property entry="9b2f87fc-91f2-485c-8035-7ef588c35fda"}}
Some of the tags can result in an error message (e.g., image not found, entry not found, etc). You can specify a different message (or blank) with message attribute:
{{someproperty message="some message"}}
For example, you can set up a wiki template that shows an image attachment and a list of entries in a sub-folder called "Links". If you used the below wiki text then you would see displayed "Could not find image" and "Could not find entry" error messages.
{{image src="::*"}}
{{links entry="Links"}}
If, however, you specify a blank message then nothing will be shown:
{{image src="::*" message=""}}
{{links entry="Links" message=""}}
You can specify prefix and suffix attributes that are only used if the tag was successful. So for example you could specify a heading for the links:
{{links entry="Links" message="" prefix="Here are the links:<br>"}}
This would only show when there is a Links sub-folder. The first set of tags show some information for the entry. Note: the attributes are all optional.
  • Tag: name
    {{name}}
    Entry name

  • Tag: entryid
    {{entryid}}
    Entry ID

  • Tag: description
    {{description wikify="true|false"}}
    Entry description. If wikify=true then treat the description as wiki text.

  • Tag: fromdate
    {{fromdate format="date time format"}}

    Tag: todate
    {{todate format="date time format"}}

    Tag: daterange
    {{daterange format="date time format" separator=" -- "}}

    Tag: createdate
    {{createdate format="date time format"}}

    Tag: changedate
    {{changedate format="date time format"}}

    Show the different dates available for an entry. If specified, format the date with the given date time format. This follows the Java date format conventions.

  • Tag: information
    {{information}}
    The information tabs.

  • Tag: properties
    {{properties metadata.types="types to show or not show"}}
    Show the properties listing. The attribute metadata.types is an optional comma separated list of the metata (or property) types that should be shown or not shown. For example, if you wanted to show all of the properties except for the Project PI property do:
    {{properties metadata.types="!project_pi" message="" }}
    
    Then if you wanted to just show the Project PI property then do:
    {{properties metadata.types="project_pi" message="" }}
    
  • Tag: html
    {{html}}
    Shows the default html view of the entry. Note: this requires an entry="..." to specify a different entry.

  • Tag: link
    {{link linkresource=true|false button=true|false output=someoutput}}
    Makes a link to the entry. Set button=true to buttonize the link. Link to the file with linkresource=true. Link to some other view with output=

  • Tag: map
    {{map width="width of map" height="height of map" listentries="true|false" listwidth="width or percent"}}
    Display a map. If the entry is a folder then display the children entries of the folder. If you do not specify a width then the map will be sized to fit its page. The listwidth is the width devoted to the entry list. This may be a fixed pixel value or a percentage:
    {{map listentries="true" listwidth="25%"}}
    
    If you have a Folder (or other group) and want to just show the Folder and nots it children then do:
    {{map entries="this"}}
    
  • Tag: earth
    {{earth width="width of map" height="height of map"}}
    Display the Google Earth plugin.

  • Tag: comments
    {{comments}}
    Show the comments.

  • Tag: breadcrumbs
    {{breadcrumbs}}
    Show the breadcrumb path.

  • Tag: layout
    {{layout}}
    This shows the "Layout:" toolbar bar for an entry.

  • Tag: toolbar
    {{toolbar}}
    Show the entry toolbar.

  • Tag: image
    {{image src="image source" alt="alt text" width="image width" link="true|false" left="absolute position" top="absolute position" linkresource="true|false" alt="image alt label"}}

    Include an image. If src is not given then this shows the image (if there is one) from the entry. If src is specified it can take on the form:
    src="entry name"
    
    to show an entry. This is equivalent to using entry="...". You can also specify the name of a file attachment to an entry with:
    entry="entryid" src="::attachment name"
    
    Or any attachment with:
    entry="entryid" src="::*"
    
    If link is true, the image displayed will be linked to the entry page, if linkresource is true, it will be linked to the full sized image (the entry resource). height and width can be used to scale the image, the alt attribute will be used in place of the entry id as a label on the image for accessibility.

  • Tag: menu
    {{menu popup="true|false" title="title to use" menus="file,edit,feeds,view,other"}}
    Show the menu actions. If menus is not specified show all of the menus. If menus is specified only show those menus listed. Show all menus in a toggle block:
    {{menu}}
    
    You can specify which menus to show with a comma separated list of menu names. Only show the file and view menu:
    {{menu menus="file,view"}}
    
    Show the menu actions in a popup:
    {{menu popup="true" title="Click here"}}
    
The following tags display a collection of entries. By default they are the children entries of the wiki entry but you can specify other groups of entries with any of the following arguments:
{{tag entry="some other entry" 
               entries="entryid1,entryid2,entryid3.." 
               entries.filter="file|folder|image|type:some type|geo|name:name aptterh|suffix:file suffixes"
               entries.fromDate="absolute or relative date"
               entries.toDate="absolute or relative date"
               exclude="entryid1,entryid2,entryid3.."  
               first="entryid1,entryid2,entryid3.."  
               last="entryid1,entryid2,entryid3.."  
               sort="name|date"  sortorder="up|down"
               max="number of entries to use" }}
The entries attribute is a comma separated list of entry identifiers. They can be specific entry ids or they can be one of a set of relative descriptors:
  • this - the current entry
  • children - the children entry
  • grandchildren - the grandchildren entries
  • greatgrandchildren - the great-grandchildren entries
  • parent - the parent entry
  • grandparent - the grandparent entry
  • ancestors - the ancestors up to the top-level entry
  • siblings - the sibling entries
  • links - the associated or linked entries
  • search - search the entire repository. The search terms are defined as attributes and described below.
The relative descriptors are applied to the base entry specified with the entry attribute. You can specify an alternative base entry for each descriptor with the syntax:
descriptor:baseEntryId
So, for example, if you had 2 different Folder entries - folder1 and folder2 and you wanted to list all of the children of each folder you could do:
{{tree  entries="children:folder1_id,children:folder2_id"}}
You can combine different relative descriptors, e.g.:
{{tree  entries="children:folder1_id,grandchildren:folder2_id"}}

Search for entries

When using the term "search" when specifying entries you can specify the following search attributes.
  • search.text="text to search"
  • search.type="entry type"
  • search.bbox="north,west,south,east" spatial bounds
  • search.group="parent entry id" or "this" for the current entry
  • search.filesuffix="file suffix"
  • search.datadate.from="from date"
  • search.datadate.to="to date"
  • search.datadate.relative="relative date, e.g., -3 days, -12 hours, -1 week"
  • search.createdate.from="from date"
  • search.createdate.to="to date"
  • search.createdate.relative="relative date, e.g., -3 days, -12 hours, -1 week"
  • search.changedate.from="from date"
  • search.changedate.to="to date"
  • search.changedate.relative="relative date, e.g., -3 days, -12 hours, -1 week"

Here are some examples:

Find all entries with text 'climate':

{{tree search.text="climate" entries="search"}}
Find all entries with file suffix 'pdf' that have been created in the last 2 days:
{{tree search.suffix="pdf" search.createdate.relative="-2 days" entries="search"}}

Filtering Entries

You can filter what entries to use with entries.filter, e.g.:
entries.filter=file|folder|image|type:some type|geo|suffix:file suffixes
If you specify suffix:file suffixes then this will only match entries that have files with the given suffix. This can be a comma separated list of suffixes, e.g.:
entries.filter="suffix:.ppt,.pptx,.pdf" 
Or negate them with "!":
entries.filter=!file|!folder|!image|!type:some type|!geo
So, you could show all of the georeferenced entries in a map and all of the non-georeferenced entries in a list:
{{map  message="" prefix="==Map=="}}

{{tree message="" prefix="==Non georeferenced entries==" entries.filter="!geo"}}
You can also:
  • If first is defined then these entry ids are put at the front of the list.
  • If last is defined then these entry ids are put at the end of the list.
  • Exclude any entries in the exclude comma separated list of entry ids.
  • Sort entries by name or date with sort
  • If images is set to true then only entries that are image files are included
Using the following attributes you can filter entries based on their date. You can specify a from date, a to date or both. The absolute dates should be of the form "yyyy-MM-dd hh:mm". The relative dates are either relative to the other date (if given) or the current time. Relative dates are of the form "+|- minute|hour|day|week|month|year"
entries.fromDate="absolute or relative date"
entries.toDate="absolute or relative date"
e.g.:
entries.fromDate="2021-06-01 12:32"
or:
entries.fromDate="-1 week"
or:
entries.fromDate="-2 weeks"
or:
entries.fromDate="2 weeks"
or:
entries.toDate="2 months"
or:
entries.toDate="4 years"        
RAMADDA provides a "Virtual Group" entry type. This acts as a Folder except a set of entry IDs or searches can be specified. There are a number of examples available here. The Entry IDs field of the Virtual Group can be a list of specific entries, e.g.:
67259186-574e-4453-a2af-969e1cf658c8
f5ccdc47-62f7-481a-b67d-bf76e5b34359
...
If an entry id has a "+" prefix then the children entries of the specified entry is used
+67259186-574e-4453-a2af-969e1cf658c8
+f5ccdc47-62f7-481a-b67d-bf76e5b34359
...
You can also specify a search. This is a set of search terms followed by "search". You can specify text to search for, the entry type, spatial bounds and date based search.
search.text=text to search
search.type=entry type
search.bbox=north,west,south,east  
search.createdate.relative=-1 day
search
  • Tag: tree
    {{tree}}
    The tree tag is used to display the children entries of a folder. It can take the form:
    {{tree title="Links" showtoggle="false" open="true" }}
    The title attribute is used in place of "Children". If showtoggle="false" then the show/hide toggle link is not shown.
  • Tag: grid
    {{grid}}
    Show the children in a grid. e.g., show the grandchildren as a grid:
    {{grid entries="grandchildren"}}
  • Tag: recent
    {{recent days="number of days to show"}}
    Show the most recent N days in a list organized by day.
  • Tag: imageplayer
    {{imageplayer width="image width" loopdelay="delay in milliseconds" loopstart="true|false" useAttachment="true|false"}}
    Show images in an image player, e.g.
    {{imageplayer loopdelay="500" loopstart="true"}}
    If useAttachment is true then, if the entry's file is not an image but it has an attachment that is an image then use the attachment image.
  • Tag: gallery
    {{gallery width="image width" columns="number of columns" showdescription="true"}}
    Show a 3 column gallery:
    {{gallery columns="3"}}
    Show a vertical listing of the children entry images:
    {{gallery columns="1"}}
    Set the image width and only show up to 5 images:
    {{gallery  width="300" max="5"}}
  • Tag: tabs
    {{tabs}}
    Show the children as tabs:
    {{tabs}}
    Show only the 3 specified entries in tabs:
    {{tabs entries="0af4d166-5723-4775-88fc-b83b72ab47a4,
                     83539d5c-e9d9-408e-b0af-35f480000ae6,
                     49684d25-6af1-4188-a0ae-4d5302d22f2a" }}
    Show only the children of type wikipage in tabs:
    {{tabs entries="type:wikipage"}}
    Additional arguments:
    • tag="some tag name" - The wiki tag to use to show the children. e.g., tag="simple" tag="html"
    • includeicon="true|false" - if true, include the appropriate icon in the tab
    • showlink="true|false" - show a link to the entry (default: true)
    • linklabel="label" - if showlink is true, use label in place of the entry name
    • imagewidth="width" - width of images
    • maximageheight="max height" - maximum height of images
    • linkresource="true|false" - if true, link to the entry resource
  • Tag: slideshow
    {{slideshow}}
    Show the children in a slideshow:
    {{slideshow}}

    Uses the same arguments as tabs, plus:

    • autoplay="true|false" - if true, start the slideshow (default: false)
    • speed="secs" - number of seconds to pause on each entry in slideshow
    • border="pixs" - border size in pixels
    • bordercolor="color" - border color (name or hexadecimal value)
    • width="width" - width of the display
    • height="height" - height of the display

  • Tag: links
    {{links separator="separator text to use" 
                              style="inline css style for the link"
                              class="css class for the link"
                              tagopen="html to prepend to the link - default is li" 
                              tagclose="close html"
                              linkresource="true|false if true link to the entry's file or URL; If false link to the entry"}}
    Layout links to the entries.
    This produces a set of links to the entries. A bulleted list:
    <ul>
    {{links}}
    </ul>
    
    A bulleted list with the links to the entry's file:
    <ul>
    {{links linkresource="true"}}
    </ul>
    
    If you wanted to make a vertical list do:
    {{links tagopen="<div>" tagclose="</div>"}}
    
    You can create a header with wiki text like:
    <center>
    {{links separator="&nbsp;|&nbsp" tagopen=""}}
    </center>
    
  • Tag: search
    {{search type="entry type" 
                      search.showform="true|false"
                      search.showheader="true|false"}}
    The "search" tag performs an entry type specific search and embed it into the wiki. This is the same as the top-level type specific search. You can use any of the "search." attributes defined above, e.g., search.text. The default is to not show the form.
  • Tag: apply
    {{apply}}
    The apply tag allows you to apply some tag (e.g., links, map) to a set of entries in turn. You can then layout the results in a variety of ways (e.g., table, tabs); The apply tag is of the form:
    {{apply
    apply.entry="the entry to find the children of"
    apply.tag="some tag to apply to the entries"
    apply.layout="table, accordion or tabs"
    apply.columns="number of columns in table"
    apply.header="text to go before can contain macros ${name} ${url}"
    apply.footer="text to go after"
    apply.border="border width - defaults to 0"
    apply.bordercolor="border color"
    apply.includeicon="true|false"
    ...
    <arguments for the apply tag>
    }}
    
    All of the arguments, including the entry argument are the same as described above but have the prefix "apply.". This way you can mix the arguments that control the apply function with the arguments that you are using for each entry. Say you have the following entries:
    parent
         entry1
                sub-entry1
                sub-entry2
         entry2
                sub-entry3
                sub-entry4
    
    If you used the apply tag:
    {{apply
    apply.entry="parent"
    apply.layout="tabs"
    apply.tag="links"
    linkresource="true"
    }}
    
    This applies the tag "links" to each main entry. It puts each result in a tab. This tag would make a 2 column table of maps with links to the entries show in the header.
    {{apply
    apply.layout="table"
    apply.columns="2"
    apply.tag="map"
    apply.border="1"
    apply.header="${url}"
    <any map arguments*gt;
    }}
    
Importing any page
You can also import any of the views of an entry, e.g., the map view, the calendar view, etc., with the {{import}} tag:
Tag: import
{{import output=""}}

So, if you wanted to show the calendar view of an entry you would do:

{{import output="calendar.calendar"}}
To find the correct output identifier just navigate to the page you want to include and look at the url for the output=... url argument and use that. A number of the layouts below (e.g,, table layout) will include a snippet of descriptive text from the entry that is being displayed. The snippet text is defined in the description of the entry with:
Some description here.
<snippet>This is the snippet</snippet>
More description