Context: Calpendo has the ability to host images which can then be used within Facility pages and in the banner at the top of a page. Images are uploaded as public resources. Public resources for most Calpendo installations are going to be used to store images which need to be used across your Calpendo. They could be used for documentation but be aware that if the document contains sensitive material once it has been included on a Calpendo page it will be viewable by anyone on the system.


Suitable for: Working with a public resource can only be done as an admin.


Steps:


How to upload an image for use as a public resource

  1. Once you have logged in click on Search in the menu bar and then Search
  2. Enter 'Public Resource' in the Search for box and click Go
  3. If no public resources exist then you can click on Create directly
  4. If a public resource exists already you will see a count of public resources - select the number of public resources shown
  5. In the table below it will list the public resources the system holds
  6. It is a good idea to check what resources are already uploaded so as to make sure you are not uploading duplicates
  7. To upload a new resource click Create
  8. Choose a name for the resource. It is a good idea to make the name unique for that resource so instead of 'logo' use 'Oncology Department Logo'.
  9. You can use spaces for the names but this will introduce %20 into any URLs which reference this resource.  Therefore try and use snake_case (underscore rather than spaces between words) or camelCase (no spaces, first word starts with lower case other words with uppercase) for the resource name.
  10. Select the attachment you wish to upload and then click Save
  11. Once you rerun the search you will now have an extra public resource which can be used in other locations

How to use a public resource in a banner

  1. Click on Admin and then Global Preferences
  2. Select Appearance in the menu on the left
  3. You will now see the 'User CSS' and 'Headings' tabs
  4. To make sure your image is inserted correctly go to 'Headings' firstly in order to provide the HTML framework for the banner.  A sample piece of HTML which can be used is found here
  5. Next you will need to make sure the relevant CSS is set.  The 'User CSS' tab can contain as many rule-sets as you like which can target element classes and IDs in Calpendo.
  6. For this example we will start by looking at a key CSS rule set which will affect the use of the image in the banner and that is as follows
  7. #banner { height: 80px; }
  8. If the banner height is set to the same height as the image the image will fit inside the banner without a gap
  9. If you increase the banner height beyond the size of the image this could be useful to provide a border around your image however you will also need to set some alignment property value pairs.  An example is below.  The original image was 60 px high with the banner set to 80px height.  This would therefore provide a neat 20 px boundary around the image aligned to the left.
#banner .exprodo-banner-edge {

    width: 200px;
    /* The width of your logo plus any additional text. */
    font-size: 14pt;
    text-align: right;
    align-content: right;
    vertical-align: middle;
    padding-top: 0px;
    padding-left:20px;
    padding-right:20px;

}