Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
peter-mw committed May 4, 2022
1 parent 4aed670 commit e9bd4f8
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 8 deletions.
11 changes: 10 additions & 1 deletion src/MicroweberPackages/App/Http/Controllers/RssController.php
Expand Up @@ -48,7 +48,16 @@ public function index(Request $request)
$tmp['id'] = $item['id'];
$tmp['url'] = content_link($item['id']);
$tmp['title'] = $item['title'];
$tmp['description'] = content_description($item['id']);
$content = content_description($item['id']);;
if(isset($item['content']) and $item['content']){
$content = $item['content'];
}

if(isset($item['content_body']) and $item['content_body']){
$content = $item['content_body'];
}
$content = app()->url_manager->replace_site_url_back($content);
$tmp['description'] = $content;
$tmp['tags'] = content_tags($item['id']);
$tmp['categories'] = content_categories($item['id']);

Expand Down
8 changes: 3 additions & 5 deletions src/MicroweberPackages/App/resources/views/rss/atom.blade.php
Expand Up @@ -18,8 +18,8 @@
@php
if (!empty($item['categories'])) {
foreach ($item['categories'] as $catItem) {
echo '<category term="'.urlencode($catItem['title']).'"></category>';
}
echo '<category label="'.htmlentities($catItem['title']).'" term="'.htmlentities($catItem['url']).'"></category>';
}
}
@endphp

Expand All @@ -32,9 +32,7 @@
@endphp

@if(!empty($item['description']))
<content type="html" xml:base="{{ $item['url'] }}">
<![CDATA[ {{ $item['description'] }} ]]>
</content>
<content type="html" xml:base="{{ $item['url'] }}"><![CDATA[ {{ $item['description'] }} ]]></content>
@endif

</item>
Expand Down
Expand Up @@ -4,7 +4,7 @@
<post>
<id>{{ $item['id'] }}</id>
<Title><![CDATA[{{ $item['title'] }}]]></Title>
<Content><![CDATA[ {{ $item['description'] }} ]]></Content>
<Content><![CDATA[{{ $item['description'] }}]]></Content>

<Link>{{ $item['url'] }}</Link>

Expand Down Expand Up @@ -33,7 +33,7 @@
]]></Tags>

@if(!empty($item['image_url']))
<ImageURL><![CDATA[{{ $item['image_url'] }}]]></ImageURL>
<ImageURL><![CDATA[{{$item['image_url']}}]]></ImageURL>
@endif

</post>
Expand Down

0 comments on commit e9bd4f8

Please sign in to comment.