Chybné generování odkazů (velká písmena a „%3A“)

NouF
Člen | 67
+
0
-

Ahoj,

můžu poprosit o pomoc? Mám aplikaci, kde chci využívat zanořování presenterů.

Co dělám špatně?

Ale dostávám tento výstup:

<li><a class="dropdown-item" title="Profil" href="/admin/Profile/">Profil</a></li>
<li><a class="dropdown-item" title="Upravit heslo" href="/admin/Profile%3APassword/">Upravit heslo</a></li>

Latte:

<li><a class="dropdown-item" n:href=":Admin:Profile:" ...">...</a></li>
<li><a class="dropdown-item" n:href=":Admin:Profile:Password:" ...">...</a></li>

Router create:

protected function buildAdmin2(RouteList $router): RouteList
	{
		$router[] = $list = new RouteList('Admin');
		$list[] = new Route('[<locale=cs [a-z]{2}>/]admin/<presenter>/<action>[/<id>]', [
			'presenter' => 'Home',
			'action' => 'default'
		]);

		return $list;
	}

Struktura:
Složky

application:
    errorPresenter: Core:Error
    mapping:
      	Admin: [App\Module\Admin\Bundles, *, *\*Presenter]
      	Web: [App\Module\Web\Bundles, *, *\*Presenter]
      	Api: [App\Module\Api\Bundles, *, *\*Presenter]
    scanDirs:
        - %appDir%

Comoser:

 "require": {
		"php": "^8.0",
        "nette/di": "^3.0",
        "nette/finder": "^2.5",
        "nette/forms": "^3.1",
        "nette/http": "^3.1",
        "nette/mail": "^3.1",
        "nette/safe-stream": "^2.5",
        "nette/security": "^3.1",
        "nette/schema": "^1.2",
        "nette/utils": "^3.2",
        "nette/caching": "^3.1",
        "nette/robot-loader": "^3.4",
        "latte/latte": "^2.11",
        "tracy/tracy": "^2.9",
        "contributte/bootstrap": "^0.5.0",
        "contributte/translation": "^1.0",
        "nextras/orm": "^4.0",
        "nextras/migrations": "^3.1",
        "ublaboo/datagrid": "^6.9",
        "symfony/dotenv": "^6.0",
        "contributte/console": "^0.9.2",
        "nextras/dbal": "^4.0",
        "nextras/secured-links": "^1.9",
        "ramsey/uuid": "^4.3",
        "contributte/forms-bootstrap": "^0.5.3",
        "contributte/application": "^0.5.1",
        "psr/log": "^3.0"

Editoval NouF (30. 5. 2022 9:58)

David Matějka
Moderator | 6445
+
+3
-

ahoj, imho pouzivas Nette\Routing\Route namisto Nette\Application\Routers\Route

NouF
Člen | 67
+
0
-

Wow, moc díky..

btw. jak si na to přišel?

David Matějka
Moderator | 6445
+
+1
-

v application se totiz nastavuji ty filtry pro konkretni parametry jako presenter, viz:

https://github.com/…rs/Route.php#L31