I’m installing FarCry 7 for a client who would also like to access other tools that are not FarCry related. For example, we created a survey form on his site and he’d like to access the responses within the FarCry interface and would like to grant certain FarCry groups access.
I’ve been able to add another tab using customadmin.xml:
<?xml version="1.0" encoding="utf-8"?>
<webtop>
<section id="sitesystems" label="Site Systems">
<subsection id="subsection1" label="Test Admin">
<menu id="subMenu1" label="Test">
<menuitem sequence="1" label="Link to Test" link="/admin/customadmin.cfm?module=admin/admin.cfm&goHere=userAdmin" />
<menuitem sequence="2" label="Link to Test Two" link="/admin/customadmin.cfm?module=admin/admin.cfm&goHere=companyAdmin" />
</menu>
</subsection>
</section>
</webtop>
The tab and submenu does appear in the navigation, but when I click on an item, I’m taken out of the Farcry interface.
Can you share your admin/admin.cfm
as well? I’m guessing that it’s just doing a redirect to another page which is possibly why it’s jumping out of the webtop.
To embed other functionality you could, in your admin/admin.cfm
, either try to use a <cfinclude>
to include the required code or you can try using an <iframe>
(assuming it’s something existing that works as a standalone app).
Ideally this should be a form
component with a webskin/view rather than a naked CFM template.
For example something like:
- create a
./packages/form/adminCompany.cfc
- create a view
./webskin/adminCompany/webtopBody.cfm
- reference the view in the webtop XML
<menuitem sequence="2" label="Link to Test Two" typename="adminCompany" />
Hey Justin & modius,
Yes, we were using a cflocation redirect. That worked fine in Farcy 6 because that redirect was happening inside of a frame. Our pages would live in that frame and we could do all kind of internal linking. It looks like Frames are out for FC7, so to do something similar to what we were doing before, we’d need to find some other DOM object to target, right? Are there built in javascript functions to do that, or do you think it would be better to after the admin/admin.cfm page holding the admin: tags with a cfswtich statement calling stuff via a cfinclude or cfmodule tag?
As for deploying a form component, that might be an interesting solution. I don’t think we’ve ever tried using that. I’ll check it out, but I also want to see if what other path you guys might think about since we still have some stuff we developed for FC6 that we’d kind of like to bring forward… though obviously, at some point, we need to adapt
-Phil
You should be able to use an iframe to get it working as before then. Perhaps have a look at the FarCry SOLR Pro plugin, I’m pretty sure there is an example there where they use an iframe to embed some of the SOLR Admin pages
1 Like
Thanks justincarter! I looked at the the SOLR Pro plugin and the code for the SOLR Admin pages and was able to add non-FarCry tools. I added a menuitem node to the customadmin.xml:
<menuitem id="myToolID" sequence="35" label="Tool Name" link="/admin/customadmin.cfm?module=miscTools/myFile.cfm" />
I added the folder “miscTools/myFile.cfm” to the customadmin folder. myFile.cfm has the iframe code with the src going to a page outside of farcry.