MODx MIGX setting browser directory context - modx

I'm using MIGX to aggregate info for product entries. By default, the MODX file browser opens to directory "Files", where I'd like it to open to "Files->assets->img->products". Do I need a snippet to do this, and what variable would I set? (Or better yet, where is this type of info to be found in the rtfm?)
Thanks much!

The proper way is to create a new media source, or use the default one, and change the default browse directory for that media source. You can then restrict a specific user group to the media source or let everyone use it by default.

Related

Implement metadata on folders only, not documents

I'd like to set up metadata in a document library so that it's only applicable to folders (and subfolders). Meaning that when we add documents they shouldn't get the metadata from the columns on the folders.
I am not experienced in Sharepoint, but I tried with lists and played around with a new document library but had no success.
I thought maybe DocumentSets may help but it seems I don't have enough privileges to create them (if that's really the solution here).
Any help would be greatly appreciated.
You can create a custom Folder content type(called CustomeFolder in my test), and add site columns based on your requirement.
Then go to the library that you want to use, enable content type management, and add the custom folder content type into your library.
After that, click "customFolder" to create a folder/subfolder with metadata:
How to create a custom content type:
https://support.microsoft.com/en-us/office/create-or-customize-a-site-content-type-27eb6551-9867-4201-a819-620c5658a60f
How to add a content type into a library:
https://support.microsoft.com/en-us/office/add-a-content-type-to-a-list-or-library-917366ae-f7a2-47ad-87a5-9689a1884e60
Note: To create a custom content type, you need to have site owner permission.
Document Set also is a choice, but to create a document set, you need to be a site collection administrator.
Create and Configure a new Document set:
https://support.microsoft.com/en-us/office/create-and-configure-a-new-document-set-content-type-9db6d6dc-c23a-4dcd-a359-3e4bbbc47fc1
https://www.c-sharpcorner.com/article/create-a-document-set-in-sharepoint-online-office-365/

Kentico permanent link vs direct path

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

Is it possible to rename a Chrome Extension?

If I change the name in my extension's manifest.json, will it create a new extension or successfully change the name?
I'd like to rename (in order to 'rebrand' a bit) an existing extension, but don't want to create a distinct new one - because I want existing users to get other bundled updates. Just want to change the name users see in the store.
I checked in Chrome's developer's site, but didn't find anything related to this mentioned in any of the pages or FAQs, other than a statement saying the name is 'used to identify the extension' which makes me inclined to believe it's not possible.
Yes, if you change the name of the manifest file it will rename the entire extension. Same with the description. But the store ID will remain the same.

Kentico 9 ui permissions regarding the media library

is it possible to allow read access only to the media library? I'm setting a role and with the Media Library module, I've only set the Read permission to Allow, but a user with that role still sees the upload button. Am I looking at the wrong module?
If you go to the specific Media Library and then edit.
Then you will see the list of files within the media library.
On the left-hand side, there will be '...', hover over this and then click on Security.
Here you can specify which role you want to perform what action in that specific Media Library.
Did you configure Permissions and UI Personalization?
So in this case, I removed access to the media library. It forces editors to add images as attachments, which was my end goal. Reason being, sync only works with published content, and won't migrate files from one server to another.

add custom webpi feed programmatically

Is it possible to add custom feed programmatically to Web Platform Installer? I tried adding the feed manually and found that the feed location is stored in `%APPDATA%\Microsoft\Web Platform Installer\web.preferences file. However the file seems somewhat cryptic and I would not like to modify it manually. Is there any API for that?
Update: even if this web.preferences file could be edited it is not the way to go as it is user specific file and I need system wide configuration.
Based on this link,
Sorry, there isn't a way to do that currently (for security reasons,
we don't allow an untrusted feed to be loaded without the user's
consent)
Once the feed is added via the Options dialog, it does persist between
sessions
I think we can't add custom feed without intervene from user. Maybe you can use WebpiCmd.exe
that can be configured programmatically via scripts.
C:\Program Files\Microsoft\Web Platform Installer>WebpiCmd.exe /List /Feeds:http://yourcustomwpifeed.co.id/customFeed.xml
A little late, but maybe it may interest others. You can modify the file %APPDATA%\Microsoft\Web Platform Installer\webpi.preferences. Yes, it is a little cryptic, but here's my post about how to do it.
The file webpi.preferences is user-specific. If you want to set settings for all users, all I can think of is to write a bootstrapper application that first modifies webpi.preferences (using the code in the post) and then runs WebPlatformInstaller.exe.

Resources