Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

$table zu Extension-Point + neuen Extension-Point #22

Closed
wants to merge 1 commit into from
Closed

$table zu Extension-Point + neuen Extension-Point #22

wants to merge 1 commit into from

Conversation

lexplatt
Copy link
Contributor

@lexplatt lexplatt commented Oct 5, 2016

No description provided.

@tbaddade
Copy link
Owner

tbaddade commented Oct 5, 2016

Kannst grad beschreiben wofür du den URL_GENERATOR_PATH_CREATED EP gebrauchen kannst.

@lexplatt
Copy link
Contributor Author

lexplatt commented Oct 5, 2016

Du meinst den URL_GENERATOR_URL_CREATED EP; diesen verwende ich um die Ausgangs-Url kontrollieren zu können.

Ich habe z.b. aktuell einen Artikel "Shop" welcher unter der Url /de/shop erreichbar ist.
Weiters habe ich einen Artikel "Produkt-Detail" auf jenen ich die Detail-Url der Produkte pointe.
Jedoch sind alle Produkt aktuell mit der Url /de/shop/produkt-detail/{produkt-name} zugewiesen... mit diesem EP kann ich sie auf /de/shop/{produkt-name} verlinken lassen

@tbaddade
Copy link
Owner

tbaddade commented Oct 5, 2016

Das könntest du auch ohne den EP. Einfach anstatt den Produkt-Detail-Artikel den Shop-Artikel verwenden.

@lexplatt
Copy link
Contributor Author

lexplatt commented Oct 5, 2016

den verwende ich aber schon für die Auflistung der Produkte (um eine Kategorisierung zu ermöglich)
bildschirmfoto 2016-10-05 um 16 02 25

@tbaddade
Copy link
Owner

tbaddade commented Oct 5, 2016

Du kannst dennoch die Produkte auch diesem Artikel zuweisen und über den UrlParamKey die unterscheiden.

Bsp:

$id = UrlGenerator::getId();
$data = UrlGenerator::getData();
if ($id > 0 && $data->urlParamKey == 'product_id') {
  // Produktdetail
} elseif ($id > 0 && $data->urlParamKey == 'category_id') {
  // Auflistung der Produkte nach Kategorie
} else {
  // Auflistung aller Produkte
}

@lexplatt
Copy link
Contributor Author

lexplatt commented Oct 5, 2016

ja hatte ich Anfangs auch gedacht, jedoch beim rex_getUrl hatte ich das Problem dass IDs nicht mehr eindeutig sind, oder gibts auch da einen Workaround?

@tbaddade
Copy link
Owner

tbaddade commented Mar 10, 2017

jedoch beim rex_getUrl hatte ich das Problem dass IDs nicht mehr eindeutig sind

@lexplatt das wurde mit diesem Commithttps://github.com/tbaddade/redaxo_url/commit/9a18174e6f9b8ae87fb3d2bcd4f026fedcf12f05 beseitigt. Wäre daher jetzt alles gut?

@tbaddade
Copy link
Owner

tbaddade commented Nov 6, 2017

Workaround ist oben beschrieben. Mit der Version 2 kommen zusätzliche ExtensionPoints um noch Einfluss zu nehmen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants