gorriecoe / silverstripe-ymlpresetlinks

Adds link types preset in your config.yml for link.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Silverstripe yml preset links

Adds link types preset in your config.yml for gorriecoe/silverstripe-link.

This is useful for defining commonly used links, js functions and/or anchors.

Installation

Composer is the recommended way of installing SilverStripe modules.

composer require gorriecoe/silverstripe-ymlpresetlinks

Example usage

gorriecoe\Link\Models\Link:
  preset_types:
    'hello-world':
      Title: "Hello world alert"
      LinkURL: "javascript:alert('Hello World!');"
    'back-to-top':
      Title: "Scroll to top"
      LinkURL: "#back-to-top"
    'google':
      Title: "Google"
      LinkURL: "https://www.google.com/"
      OpenInNewWindow: true

About

Adds link types preset in your config.yml for link.

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:PHP 100.0%