Jump to content
Important Notice:
Due to further security updates and ongoing integration strategies following the latest release all schools using SIMS, WCBS or Progresso MIS systems will need to upgrade to the latest MIS extractor available here. All other schools using UK based MIS providers will be required to move to Groupcall XOD prior to the start of the next academic year. Please contact our service desk team who will help guide you through the process on 01422 395939 or via support@frogeducation.com.

FrogCode - how to a link to a file I've uploaded in the editor

Recommended Posts


I want to link an image (or file) to my widget, but I can't get the web address when I upload it.

Share this post

Link to post
Share on other sites

FrogCode Editor's file store is separate to the deployed widgets, so you're making a widget and want to include files and images in the widget, you'll need to deploy your widget first.

This will package up the widgets and deposit them in the correct location, using the widget's UUID as parent folder.

So, a file added to the assets folder has the following path:

/app/package/widgets/'WIDGET UUID'/assets/

It's worth planning ahead with your widgets and not hard-coding in your Frog's web address.  This code can help with that:

var baseURL= Frog.Utilities.getBaseUrl();

this.element.append('<img src="'+baseURL+'/app/package/widgets/WIDGET UUID/assets/myimage.png">');


Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Looks like you're enjoying the discussion, why don't you sign up?

  • Similar Content

    • By Phil Stiles
      Hi, I am trying to create a widget that is able to pull the Total Positive Behaviour Points into a variable, the end result is we will use an if statement to display a specific image depending on a number of points the student has.
      I have started by testing with the HTML widget. using the below code to see if I can use the behaviour.getBehaviourTotals API to get the total points this year for the user, however, it is not working.
      <script> var $ap,user; //Create a div, and give it a unique ID $ap = $("div", { id: Frog.Utilities.generateSimpleID() } ); $ap.html( '<b>Your House Points:</b>'+ '<table clase="table" id="your_points">'+ '<tr>'+ "<th>This Year</th>"+ '</tr>'+ '</table>' ); // Use Frog's API to get the logged in student user = FrogOS.getUser(); // Use Frog's API to get Behaviour points Frog.Model .api('behaviour.getBehaviourTotals',{ Student_uuid: user.uuid, }).done(function(behaviourResponse){ behaviourResponse.data.pos.year(function(work){ $ap.find('tbody') .append( '<tr>'+ '<td>'+ data.pos.year+ '</td>'+ '</tr>' ); }); }); arguments[0].append($ap); </script> any advice appreciated.
    • By Graham Quince
      The brilliant @Simon Law has built a new widget which adds a site's menu to a page, to save us all from having to do this manually using text widgets.
      You can download this from the showcase page:
    • By pconkie
      We have a new process for monitoring regularity and quality of home learning (all of which are now done via assignment manager).
      Happy to share this frog code app which allows Tutors, Heads of House/Year, SLT to lookup what has been assigned to a student and act accordingly.   I will ensure this app continues to work if frog change api's in the future as it is part of our internal systems.  
      I realise this functionality is available in the assignment monitor app, but we do not wish to share this app with staff as it would allow them to lookup staff as well as students!
      A quick screen shot...

    • By Graham Quince
      So, some long talked about widgets in FrogCode are finally ready for sharing, I've just added:
      Personalised welcome Week indicator Form styling (started work on this at the FrogCode event at the Judd) Soon to be joined by George Bligh's My Progress widget, which displays the My Progress application in a page for students.
      You can download these and other widgets at https://www.frogcommunity.com/frogcode/showcase
    • By Graham Quince
      Thought I'd offer a preview of a new FrogCode widget I've been working on with Caroline Worboys-Mcardle of Hendon School.   We worked on this widget together at the FrogCode workshop at the Judd School.
      In a nutshell, the widget offers simple re-styling of a Frog form:

      I'll get this released as soon as I can.