Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time

Link Generator

The Link Generator creates a valid detail and back link for each entry.

Pimcore Link Generator

If you want to use the default Pimcore Link Generator, just implement it like described in the link. If no default Link Generator Service has been defined, the News Bundle will proceed with the internal Class.

Create a custom generator

Just override the build in generator:

news:
    relations:
        NewsBundle\Generator\LinkGenerator: AppBundle\Generator\AppLinkGenerator

And set up your new class:

<?php

namespace AppBundle\Generator;

use NewsBundle\Model\EntryInterface;
use NewsBundle\Generator\LinkGenerator;

class AppLinkGenerator extends LinkGenerator
{
    public function generateDetailLink(EntryInterface $entry, $additionalUrlParams = [])
    {
        $absPath = 'your_overridden_abs_path_to_entry';
        return $absPath;
    }
}