Skip to content

A craftCMS field type where you select a server path within the webroot.

License

MIT, MIT licenses found

Licenses found

MIT
LICENSE
MIT
LICENSE.md
Notifications You must be signed in to change notification settings

amkdev/server-path-field

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Plugin Icon: A folder with a dropdown arrow on a blue background.

Server Path Field plugin for Craft CMS 3.x

A dropdown field that lets you select a directory in the public webroot of a craftCMS project. It's possible to define a root path (within the webroot) and filter multiple directories.

Requirements

This plugin requires Craft CMS 3.0.0 or later.

Installation

To install the plugin, follow these instructions.

  1. Open your terminal and go to your Craft project:

     cd /path/to/project
    
  2. Then tell Composer to load the plugin:

     composer require amkdev/server-path-field
    
  3. In the Control Panel, go to Settings → Plugins and click the “Install” button for Server Path Field.

Server Path Field Overview

Server Path Field adds a custom FieldType to Craft CMS called Server Path. This lets you choose from any direcotry found in the webroot, which then returns the path as twig value.

This plugin is basic and not so useful as standalone, but it extends the possiblities of other extensions need a specific public path. For instance Server Files or GetFiles.

Disclaimer

This plugin is distributed free of charge under the MIT License. The author is not responsible for any data loss or issues resulting from use of the plugin.

Special Thanks

This plugin is based on the Asset Folder Field plugin by Ryan Whitney.

This plugin was made with the help of assets and code found within the CraftCMS community. These folks are not affiliated with this plugin in any way, though I greatly appreciate their contributions to the community.

Thanks to @mmikkel, whose IncognitoField plugin was heavily referenced and used as a general framework when using this plugin. 🎉

Thanks to @anubarak, whose StackExchange answer provided the basis for the folder finding logic. 🎉

And thanks to @landon, whose folder icon was used in the logo. 🎉

About

A craftCMS field type where you select a server path within the webroot.

Resources

License

MIT, MIT licenses found

Licenses found

MIT
LICENSE
MIT
LICENSE.md

Stars

Watchers

Forks

Packages

No packages published