PHPackages                             codeq/link - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. codeq/link

ActiveNeos-package[Utility &amp; Helpers](/categories/utility)

codeq/link
==========

Link helper for Neos - with Atomic.Fusion &amp; Monocle in mind

v2.3.0(1y ago)018.4k↑161.1%GPL-3.0-or-later

Since Feb 3Pushed 1y ago1 watchersCompare

[ Source](https://github.com/code-q-web-factory/neos-link)[ Packagist](https://packagist.org/packages/codeq/link)[ RSS](/packages/codeq-link/feed)WikiDiscussions master Synced yesterday

READMEChangelog (10)Dependencies (3)Versions (15)Used By (0)

[![Latest Stable Version](https://camo.githubusercontent.com/b2706605758f4351e6565fa589324e9ed4381e2766a823b9bb683868956d385b/68747470733a2f2f706f7365722e707567782e6f72672f636f6465712f6c696e6b2f762f737461626c65)](https://packagist.org/packages/codeq/link)[![License](https://camo.githubusercontent.com/4ac6ac495de131eb9dfcd5f271e088335f67bd7eab742130b0bd437096fefdae/68747470733a2f2f706f7365722e707567782e6f72672f636f6465712f6c696e6b2f6c6963656e7365)](LICENSE)

CodeQ.Link
==========

[](#codeqlink)

The Neos link helper with Atomic.Fusion &amp; Monocle in mind
-------------------------------------------------------------

[](#the-neos-link-helper-with-atomicfusion--monocle-in-mind)

Here's the most basic usage, which separates your Monocle presentational components from your integration. By providing a transfer object, you can keep your presentational components clean without cluttering your props.

```
prototype(YOUR.Site:Presentation.Atom.Link) < prototype(Neos.Fusion:Component) {
    @styleguide {
        title = 'My Link'
        props {
            link = CodeQ.Link:Link {
                link = 'https://github.com/code-q-web-factory/neos-link'
                label = 'CodeQ.Link is awesome'
            }
        }
    }

    link = CodeQ.Link:Link

    renderer = afx`

    `
}

prototype(YOUR.Site:Presentation.Molecule.BlogPostTeaser) < prototype(Neos.Fusion:Component) {
    @styleguide {
        title = 'Blog Post Teaser'
        props {
            link = CodeQ.Link:Link {
                label = 'My first blog post'
                link = 'https://example.org/my-first-blog-post'
            }
            description = 'Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam'
        }
    }

    renderer = afx`

            {props.link.label}
            {props.description}

    `
}

prototype(YOUR.Site:Content.BlogPostTeaser) < prototype(Neos.Fusion:Component) {
  link = CodeQ.Link:NodeLink {
      node = {node}
      backendLink = false
  }
  description = Neos.Neos:Editable {
      property = 'description'
  }

  renderer = YOUR.Site:Presentation.Molecule.BlogPostTeaser {
      @apply.props = ${props}
  }
}

```

By separating the aspects of link types and rendering we enable the separation of those aspects into different fusion-components.

What's important to notice:

- If a link should be a link in the backend can be controlled in your integration with `backendLink = false`
- If a component should be rendered, if no link is given can be configured on presentation with `
