Typo3 8.7 export plugin content as RSS feed - rss

I want to export the contents of my extension's plugin to RSS. I have followed a number of tutorials online but none of them are working.
In my Plugin's setup-ts I have added the following (newsevents is my extension, nepi5 is the plugin within that extension)
pageNewsRSS = PAGE
pageNewsRSS{
typeNum = 9818
10 < tt_content.list.20.newsevents_nepi5
config{
disableAllHeaderCode = 1
additionalHeaders = Content-Type:application/rss+xml;charset=utf-8
metaCharset = utf-8
xhtml_cleaning = 0
admPanel = 0
debug = 0
no_cache = 1
disablePrefixComment = 1
}
}
In my template file I have the following:
<rss version="2.0">
<channel>
<title>Title</title>
<link>https://www.URLLINK.com</link>
<description>Description</description>
<f:for each="{articles}" as="article" iteration="iterator">
<item>
<title{article.titel}</title>
<description>{article.content}</description>
</item>
</f:for>
</channel>
</rss>
...when I view the page using typeNum 9818 (&type=9818), the correct action for my plugin runs, the correct data is passed through to the template, but the page is still written with HTML elements with a head tag, a body tag and within the body tag.
I'm obviously missing something major regarding templating. Any help appreciated.
I'm using a plugin in my extension because I use a Flexform to choose which items from a list I want to show.

I think your problems result from skipping a proper page templating and trying to generate the whole page in the plugin.
I would try to build a fluid page template which includes the output of the plugin. and the plugin just renders the inner loop.

Related

How can I add a css file into my TinyMCE template?

My question is about Tinymce Template Plugin.
I have been developing a CMS with ASP.NET MVC. I can insert a template by using “insert template plugin”, but I can not insert a css file.
The template I will insert should be more developed. When I add a css file, it does not work. For example, <link rel=“stylesheet” type=“text/css” href=“theme.css”>. This link is my template I want to use.
And then I am saving this content into my database. This link can not be saved into my database. It can not be seen.
I used content_css ,the template looks good in the editor, but when I look at the page, it looks very bad because the css files does not work. In addition to all of these, when I look at the table of database (column : content) there are not css links (<link href...)
What should I do for this problem ? Thanks for your help.
CSS links belong in the head of the document, it is not valid HTML to add the link tag to the body. The Template Plugin allows you to add fairly involved HTML to the HTML body so you don't have to build that chunk of HTML over and over again. Please read the documentation for Templates: https://www.tiny.cloud/docs/plugins/template/
When you apply CSS in content_CSS it only affects how TinyMCE looks in the iFrame that the editor lives in. You need to get the CSS into the head of the page you are bringing over from your databse.

Edit posted sourcecode on wordpress not working

I've a wordpress blog directly hosted from wordpress and I use the [code] tags to post sourcecode on wordpress, that works fine so far.
Thats the original code tag I posted
[code language="xml"]
<TypeScriptTarget>ES5</TypeScriptTarget>
[/code]
But when I try to edit my posts with contained sourcecode it looks like this
and when I update my post the same not encoded symbols are shown on my blogpost too. Id don't know what I am doing wrong here.
First, you want to make sure the Visual Mode in WordPress is disabled, and only use Text Mode.
Users > Your Profile
Then you don't need to use a WordPress shortcode for adding a preformatted code block.
Check out the WordPress Codex Writing Code in Your Posts page:
https://codex.wordpress.org/Writing_Code_in_Your_Posts
Just use the HTML <pre> and <code> HTML tags:
<pre><code>
<TypeScriptTarget>ES5</TypeScriptTarget>
</pre></code>
You will notice I am using the HTML entity for the greater and less than symbols so they render correctly on the front-end of WordPress.
< = <
> = >
Resource links to the <pre> and <code> elements:
<pre> tag: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/pre
code tag: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/code

RSS feed items only link back to homepage of my blog, not the individual posts

I've created an RSS feed, but when someone subscribes to it, either through Google or Yahoo! the only links showing up take them to the blog. And when someone clicks on the links it takes them to my blog whereas I want to show the blog content without people have to click on the link.
<?xml version="1.0" encoding="ISO-8859-1" ?>
<rss version="2.0">
<channel>
<title>cmg</title>
<link>http://www.example.com/blog</link>
<description>cmg</description>
<item>
<title>cmg</title>
<link>http://www.example.com/blog</link>
<description>cmg</description>
</item>
</channel>
</rss>
I've also put this link in the body of my site and not the head as I don't have access to the <head> using the CMS which doesn't allow me to enter any code apart from CSS or JavaScript.
When creating an RSS feed you have to make sure each <item> node points to a specific post. The channel elements will describe the site overall with the link back to the homepage and a short description. But it's the individual items that will show per post that need to be crafted.
In your case, your item(s) only shows the link to and content of the homepage, or copies what you have in the <channel> parent elements.
An example RSS feed with two posts would be like thus:
<?xml version="1.0" encoding="ISO-8859-1" ?>
<rss version="2.0">
<channel>
<title>Example</title>
<link>http://example.com/blog</link>
<description>Description of entire site</description>
<item>
<title>Example blog post</title>
<link>http://example.com/blog/example-blog-post</link>
<description>One example straight from the individual</description>
</item>
<item>
<title>Another post</title>
<link>http://example.com/blog/another-post</link>
<description>Another example of a single post</description>
</item>
</channel>
</rss>
In the above example you'll note that each <item> has a uniquie <link> node which points to the permalink of that post as well as the description for it. These are separate and different to those of the <channel> overall.
When the user then subscribes to your feed, it will load the posts into their content aggregator and they will be able to read your posts without have to click back to the site.
You can have a link to the RSS anywhere on the page. If you add that as a <link> in the header, then it will allow browsers that can detect feeds to show the relevant icon, but it's not necessary if you can otherwise provide a means to reach the file and promote it.

drupal view rss having extra spaces

I have created a feed view in drupal and i've set the Rss feed and all the settings properly but the problem is when i click on view feed it returns the page having space above the starting of the file as shown below.
<?xmlns version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="http://cloud.ilinksys.com/feed.xml" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
The above space is already in the page. Anyone have any idea to remove the extra spaces of above the rss feed actual data.?
usually there's extra space before opening php tag <?php in template.php file or any other template or modules file which are called.

Can't get fields to show in Drupal Views module

I have a view setup in the Views module that outputs an RSS feed of nodes. In the Fields section I have specified that I want the Title, Date and Body in the feed, but Views seems to ignore all but the title (and the link which I haven't specified to include). I know it's using the Views module because if I remove the title for each item or rename the entire feed it is reflected in the actual feed. I don't think there's any tpl files that are restricting the output either, but I don't know all the places to look. Does this sound familiar?
<?xml version="1.0" encoding="utf-8" ?>
<rss version="2.0" >
<channel>
<title>RSS Feed Title</title>
<description>...</description>
<link>http://...</link>
<item>
<title>Title</title>
<link>http://...</link>
</item>
<item>
<title>Title</title>
<link>http://...</link>
</item>
.
.
.
Click on the Feed display tab. Under Basic settings, click on the gear icon for th Row style. Check the Display type and set it to something other than Title only.
You may also want to check out the Views RSS module. It provides more flexibility in terms of what you're able to include in the feed. It's especially useful for including CCK fields in the feed.

Resources