From 1c178a417502b8a41f3b12c7a2ae4d11b23ac3d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Toborek?= Date: Thu, 30 Jul 2015 16:12:23 +0200 Subject: [PATCH] Revert "EZP-24659: Replace `outputtype` parameter with `outputtypeid` in request query string" --- Resources/public/js/recommendationrestclient.js | 4 ++-- Resources/public/views/show_recommendations.html.twig | 2 +- Twig/RecommendationTwigExtension.php | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Resources/public/js/recommendationrestclient.js b/Resources/public/js/recommendationrestclient.js index 0d37bce..79e508f 100644 --- a/Resources/public/js/recommendationrestclient.js +++ b/Resources/public/js/recommendationrestclient.js @@ -20,7 +20,7 @@ this.language = config.language || ''; this.fields = config.fields || []; this.contentType = config.contentType || ''; - this.outputTypeId = config.outputTypeId || ''; + this.outputType = config.outputType || ''; this.contextItems = config.contextItems || ''; this.categoryPath = config.categoryPath || ''; this.errorMessage = config.errorMessage || 'Error occurred while loading recommendations'; @@ -70,7 +70,7 @@ '.json?numrecs=', this.limit, '&contextitems=', this.contextItems, '&contenttype=', this.contentType, - '&outputtypeid=', this.outputTypeId, + '&outputtype=', this.outputType, '&categorypath=', encodeURIComponent(this.categoryPath), '&lang=', this.language, attributes diff --git a/Resources/public/views/show_recommendations.html.twig b/Resources/public/views/show_recommendations.html.twig index 36bf8a7..f672e5c 100644 --- a/Resources/public/views/show_recommendations.html.twig +++ b/Resources/public/views/show_recommendations.html.twig @@ -12,7 +12,7 @@ endpointUrl: '{{ endpointUrl }}', language: '{{ language }}', contentType: '{{ contentType }}', - outputTypeId: '{{ outputTypeId }}', + outputType: '{{ outputType }}', contextItems: '{{ contentId }}', categoryPath: '{{ categoryPath }}', fields: [{% for entry in fields %}'{{ entry }}', {% endfor %}], diff --git a/Twig/RecommendationTwigExtension.php b/Twig/RecommendationTwigExtension.php index 0539ce1..7a1cf0a 100644 --- a/Twig/RecommendationTwigExtension.php +++ b/Twig/RecommendationTwigExtension.php @@ -240,7 +240,7 @@ public function showRecommendations( 'endpointUrl' => $this->getEndPointUrl(), 'feedbackUrl' => $this->getFeedbackUrl($this->getContentTypeId($contentType)), 'contentType' => $this->getContentTypeId($this->getContentIdentifier($contentId)), - 'outputTypeId' => $this->getContentTypeId($contentType), + 'outputType' => $this->getContentTypeId($contentType), 'categoryPath' => $this->getLocationPathString($contentId) ) );