I am trying to link to a image stored in the Images library of an individual site collection.
I am able to link to images in the root site collection folder using url(../../Images/imagename.ext), however I want to link to the individual sites Images library, without directly inserting the site name.
I know this can be done easily enough in a page layout, using a dynamic token #SPUrl:~site
Is there an equivalent I can use in CSS?
Do your images need to change from site collection to site collection? If not, I put them into the 12\TEMPLATE\IMAGES\MyProject directory. I can then refer to the image in CSS as:
background-image: url(/_layouts/images/myproject/imagename.ext);
The virtual _layouts path insures that it will work for any depth on the server.
Related
I'm building a site and would like that in this site I show some images which are in a specific folder in another site.
Any idea if that is possible and how it can be done. I know that with Highlighted Content I can show documents in different site but I do not have an idea how can I filter to a specific folder.
The images are found in this file path
Would you kindly help me out on this?
Thanks in advance
As a workaround, you could use image web part to show image from another site:
Besides, for Highlighted Content Web Part, you could add filter to show documents in a specific folder. Like the below:
I need to dynamically include images on an Acumatica report.
I'd prefer not to attach the images to an Acumatica record as I'll have 10,000+ images within 12 months time. If I can reference by URL, I can utilize the image generation, caching and cleanup operations already in place on my web server.
When I try to setup a PictureBox in Report Designer as shown in the screenshot below, the image does not output on the report.
Any ideas? Is referencing an image by external URL supported in Acumatica? I've tried in both 2017r2 and 2019r1.
If I understand correctly the S130 training then you can't use 'External' for accessing images by URL (http, https)
Note from S130 Training Course, page 176
You can also show images uploaded to the site folder. If you were to
do that, for the image box, you would select Source as External and
specify the URL of the image in the Value property. For example, you
have uploaded the MyImage.png file to the /Site/ Images/ folder. In
the Value property, you should specify the following URL: Images/
MyImage.png.
Report designer doesn't have option of showing external images ( images from external web sites ). That is done for security reasons. As a workaround I would recommend to use a page, inside of Acumatica, that will give you page from external source. For example you can create folder /ExternalDomains/getimage.aspx?id=imageID. Or even lighter version, create ashx handler, I just suppose you'll need to dig deeper into how to make it inside of Acumatica. Here is interesting link on ashx handlers, similar technologies can be googled for aspx pages.
I'm working on some site that all links (dynamic + hard-coded) to media library are permanent links (with getmedia...), which made it so hard to locate the exact folder of the files and update them. I've asked some developer and heard that permanent links are more secure as the system can check who have access to download the materials. Is it a fair statement and why/why not? Thanks for your input!
This is not a fair or correct statement. Access is set at the individual medial library directory, not an individual file level.
For example, if you have an Images media library which has no security behind it, you can access it directly with a URL of:
/site/media/images/logo.png or /getmedia/<guid>/logo.png
and the image will display without issue.
Now you have another media library called "Secure_Files", if you attempt to access:
/site/media/secure_files/file1.pdf
You'll get an error or a login page because the security is set on the
/site/media/secure_files directory.
Here is the documentation on securing media libraries.
By default, Kentico does not check the See library content permission for visitors on the live site. If you wish to require users to have this permission to view media library content, you need to enable the following settings in the Content -> Media category of the Settings application:
Use permanent URLs
Check file permissions
See the note at the very bottom of this documentation page.
Permanent Link is made up of:
/getmedia/
Guid ID
Image Path
.aspx
Eg: /getmedia/C73B5-6A0-4F6-878-3C29D792014/IMG_3860.jpg.aspx
Direct Path is made up of:
/
Site Name
Media Library Folder Name
Image Path
Eg: /google/media/Blog-images-from-Kentico-Cloud/IMG_360.jpg
I am using Orchard 1.8.1 and one of the sections of the site I'm building is for a standard photo gallery. Since all the modules involving photo galleries are ancient, I opted to stay native and try using custom content types to build it instead. The way I accomplished this is with a Photo Gallery content type that has the Container part associated, then a Photo Gallery Item content type that has the Containable part associated to it.
Using the Shape Tracing tool, I was able to build out the main gallery page that shows all the individual galleries, but when you go inside a single gallery is where I get lost. The attached screenshot probably shows it best, but in the Content zone, I can see there are two individual items contained under Model.ContentItem.ContainerPart.ItemCount, however I can't figure out how to access those individual items to build a template to show them. The point of the gallery page will be implementing the gallery from Galleria, so whenever I view the individual page for the Photo Gallery content type, I need to access all child items underneath it to build this.
Any ideas?
You can use a media library picker field configured for multiple media, and then edit each image to set its caption and title. Then, it's just a matter of customizing a template override in your theme to make it look exactly the way you want.
Background
My task is to, in SharePoint, show an image of a process map which should be clickable. Think of an imagemap in html. Some areas take you to other process map images and other brings up a pop-up window.
"Connected" to each process map is a set of documents. These documents are stored in a document library. There are one process map for each folder in the document library. The documents should be shown next to the image. The person clicking either the image or a folder to navigate in the hierarchy should also be able to upload, download and delete the documents.
Question
What would be the easiest solution for this?
My thoughts
... so far is to create a custom web part which I add above the document library browser (the default one in MOSS 2007). This web part reads some xml file pointing out the image to show and the areas which is to be clickable. It listens for some kind of events from the document library, like clicks on folders in the browser or it reads the current URL to know where in the folder hierarchy we are currently, and from that show the correct process map image. When the image is clicked, the web part updates the image and tells the document library to update accordingly.
Is this feasible? Am I on the wrong track? How do I communicate with a document library?
Thanks, Martin
My thoughts are that you create a web part that displays your image map and outputs(provider) the appropriate criteria to a another web part that consumes it and displays the files in a document library.
You can achieve this by creating your own custom webpart that displays a document library based on a CAML query. Each Images sends a different CAML query to the document library webpart.
I hope this helps. Please provide information on how you solved this problem if you have already done so.
Thanks
Long since I've been here... Actually solved this one.
We created two web parts, one for process navigation and one for filtering documents in the document library.
The web part for process navigation is actually just a web part that looks for a specific query parameter in the URL and adds ".html" to it. Then looks for that document in a document library. If found then this document is shown inside an iframe. Simple!
The html documents are produced by Visio and exported to html, then uploaded to SharePoint. The links in the Visio document drives the application with queries.
The web part that shows the corresponding documents also looks for a specific query in the URL then sends filterparameters to the document library through the IfilterProvider interface. I snatched this example IFilterProvider at MSDN and made it look in the URL for parameters and then made the controls invisible to the user.
Really simple solution, though the customer needs to put in a lot of work to incorporate their company processes into it. And it is somewhat error prone and probably a sucker to make changes to data-wise.