Tiny News Feed
News List
Home Page
News List
Search
Editing
Edit This News
Please correct the information in the form below in order to edit this page on your website.
Page URL:
http://mimimi.software/demos/TinyNewsFeed/news/
Leave this field blank if you want to automatically generate the page URL. In this case, it will consist of a random set of characters.
Visible For All
Title:
This field contains the name of the publication in listings. It is also the string of the page Title tag.
Short Text:
In this example, we will read the list of viewers with the sitemap functionality and put it into the variable $TEST. We will then iterate through this list to print its elements.
This field contains short introductory text that appears in publication listings and at the top of the publication page. It is also the string of the page Meta Description tag.
Full Text:
<p>You can use this example to get all viewer names that support some functionality.</p><hr><h4>Theory</h4><p>Note that a viewer is a module designed to read specific database records located at the URLs associated with that viewer.</p><blockquote><p><small>The first segment in such URLs is always equal to the viewer name. For example, the locator <code>https://your.site/news/some-url-path</code> is associated with the <code>News</code> viewer.</small></p></blockquote><blockquote><p><small>And next example. Any locators like listed below are associated with the <code>Search</code> viewer:<br>• <code>https://your.site/search</code>,<br>• <code>https://your.site/search/some-page-number</code>,<br>• <code>https://your.site/search?q=some-query</code>,<br>• <code>https://your.site/search/some-page-number?q=some-query</code>,<br>• <code>https://your.site/search/some-url-path</code>,<br>• <code>https://your.site/search/some-url-path/some-page-number</code>.</small></p></blockquote><p>However, a viewer module may provide full or partial functionality depending on the goals of its developer. In this case, for some pages of the website, it may be important to get a list of viewers that correspond to the functionality of this page.</p><p>Therefore, unsuitable viewers are excluded from the resulting list if they do not have a template in the wesite theme that corresponds to such functionality.</p><blockquote><p><small>To exclude unsuitable viewers, you need specify a relevancy pattern as an input parameter to the <code>getViewers</code> method.</small></p></blockquote><h4>Source Code</h4><p>Please paste this code snippet into your template to see how it works.</p><blockquote><p><small>Let's experiment with a template like <code>tiny.news.feed/Themes/default/404.tpl</code> by pasting code into it and then opening some <a href="some-indefinite-vague-non-existent-abracadabra" rel="nofollow">non-existent page</a> associated with that template.</small></p></blockquote><pre><?php $TEST = $cms->getViewers('*-sitemap.tpl'); foreach ( $TEST as $name ) { echo $name . ' <br>'; } ?></pre><blockquote><p><small>Note that the <code>$cms</code> variable is a system pointer to your web application. And <code>getViewers</code> is a public method for reading the viewer names. If you are interested in the algorithm of this method, look at the file <code>tiny.news.feed/Application.php</code>.</small></p></blockquote><p><small>* This page is a demo post designed to display page content for testers. You need <a href="news/demo-posts/faq/how-to-get-names-of-relevant-viewers/delete" rel="nofollow">delete this page</a> when you run the website in production mode.</small></p>
You can use valid HTML markup for this field. All HTML tag attributes will be removed for security reasons except attribute href="some-url" for tag <a> and attribute src="some-url" for tag <img>.
Image to upload:
The file length should not exceed 5 megabytes. File type: WEBP, JPEG, PNG, SVG, GIF or BMP.
Image URL:
http://mimimi.software/demos/TinyNewsFeed/
You should enter the image URL manually if your page needs to have an image with a specific file name. Otherwise, the image URL will be set to the name of the uploaded file. If you need an external image on your page, enter its absolute URL here and do not use the input field above to upload the image.
Send »
× Cancel