austega
Member
I need some guidance particularly re applying a custom link using a calc element in a list display. Here is what I am trying to achieve:
- The fabrik_erd_records list contains more than a thousand records of electronic genealogical resources of three types (there is a non-displayed id_linktype element in the list for the three different types):
- Resources on local server (html or pdf) - accessed by appropriate URL
- Resources (websites) elsewhere on the internet - accessed by appropriate URL
- Installed Windows applications hosted on local IIS server - accessed by running appropriate cmd or bat file for example <javascript LaunchApp ('C:/TSapplications/Scripts/diggerbty.cmd');>
- The public to be able to click on the displayed ___resource element and be taken to the appropriate resource via the appropriate URL or script contained in the non-displayed ___link calc element (which is constructed as a conditional concatenation of text strings and non-displayed ___path and ___url elements in the list - the constructed string format varies conditionally on the id_linktype value).
- The administrator only to also be able to click on a details link (not visible to public) and to be able to edit/delete the full record.
- Set the List | Access to Special for all but the View list which is Public
- Set the ___resource element | List View Settings | List settings | Custom Link to {fabrik_erd_records___link}, with Show in List and Link to details set to Yes, and other options on that tab set to No.
- While the above seems to work for Resources of the first two types (see above), for resources of the third type it produces a link such as http://localhost/index.php/javascript%20LaunchApp%20('C:/TSapplications/Scripts/diggerbty.cmd');
when the value of ___link for that record was "javascript LaunchApp ('C:/TSapplications/Scripts/diggerbty.cmd');" Where does the http://localhost/index.php/ prefix come from and how can I prevent it? It seems to be assuming it should treat the value as a relative link. - I am not sure if javascript LaunchApp ('C:/TSapplications/Scripts/diggerbty.cmd');will achieve what is intended but it is in line with what was done on the previous version (not using Fabrik) that we are trying to replicate. In any case we want the element link in the Fabrik list display to trigger a cmd or bat file located on the server.
- The view and edit and delete icons are shown for each row when an admin user displays the list. However if the admin user edits a record?s ___path variable the ___link calc element is not recalculated but rather shows as a null value. How do I ensure this calc element recalculation is triggered on an edit of the underlying elements? At present the calc element has Calc on Save set to Yes.