Skip to content

Commit

Permalink
Merge pull request #104 from NetCommons3/develop
Browse files Browse the repository at this point in the history
新着のRSS出力で、タイトル等が空で出力される
  • Loading branch information
s-nakajima committed Aug 9, 2017
2 parents 751f574 + f7a644a commit b6870d0
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions View/Topics/xml/index.ctp
Expand Up @@ -25,22 +25,22 @@ $channelData = array(
$content = '';
foreach ($camelizeData as $item) {
// フィードの本文が正しくなるよう HTML の削除とエスケープ
$bodyText = $this->Text->truncate($item['topic']['displaySummary'], 400, array(
$bodyText = $this->Text->truncate($item['Topic']['display_summary'], 400, array(
'ending' => '...',
'exact' => true,
'html' => true,
));

$contentData = array(
'title' => h($item['topic']['displayTitle']),
'link' => $item['topic']['path'],
'guid' => array('url' => $item['topic']['path'], 'isPermaLink' => 'true'),
'title' => h($item['Topic']['display_title']),
'link' => $item['Topic']['path'],
'guid' => array('url' => $item['Topic']['path'], 'isPermaLink' => 'true'),
'description' => $bodyText,
'pubDate' => $item['topic']['publishStart'],
'content::encoded' => array('value' => $item['topic']['summary']),
'pubDate' => $item['Topic']['publish_start'],
'content::encoded' => array('value' => $item['Topic']['summary']),
);
if ($item['category']['name']) {
$contentData['category'] = h($item['category']['displayName']);
if (!empty($item['Category']['name'])) {
$contentData['category'] = h($item['Category']['display_name']);
}

$content .= $this->Rss->item(array(), $contentData);
Expand Down

0 comments on commit b6870d0

Please sign in to comment.