typo3 tt_news - single view, 2 domains and one storage folder all news are visible in both 2 domains - typo3

problem description:
i have two domains on one typo3 installation
i have one folder (general record storage page) with tt_news records for both 2 domains
i have two pages with tt_news single view one for each domain
each single view plugin is configured to show news only from selected category.
problem:
each news is available on both domains.
example:
1. domain1.com/news/title-news-foo.html
2. domain2.com/newsfromdomain2/title-news-foo.html
ex 1, its ok, news is assigned to category from this domain
ex 2, its wrong, this news should not be displayed here becouse it`s displyaed on domain1.com
It looks that in single view typo3 is not considering Categry mode selection.
So how to resolve this issue, without separing news to indepenedent GRSP ?

I would suggest you split it up into seperate storage folders
This make things a lot easier. It also sounds you are not using the category mode what it is meant for.
Suggestion:
-GRSP
-- NEWS DOMAIN A
-- NEWS DOMAIN B
In the views on both domains set the correct storage folder.

Related

tx_news article in restricted area can be accessed via url

I have tx_news installed with TYPO3 8.7. I use the plugin two times, one in a restricted area and the other one in a public area.
I noticed that if I paste a speaking url path segment of an article in the restricted area into the url of the detail page of the public area, the article will be shown without any restrictions.
Example:
The public url of an article is
https://example.com/news/artikel/my_public_article
If I replace now /my_public_article with the speaking url path segment of the restricted article like
https://example.com/news/artikel/my_restricted_article
the article will be shown.
How can I avoid that?
I already set the starting point of the plugin on my public detail page to the public records folder and set recursive to 0.
You can set the following TypoScript:
plugin.tx_news.settings.detail.checkPidOfNewsRecord = 1
From the news documentation:
If set, the detail view checks the incoming news record against the defined starting point(s). If those don’t match, the news record won’t be displayed.
Possible solutions: Set access rights per news record or filter by category in detail view in fluid template (if user is logged in then show record content).

Blog-like single element pages with TYPO3 / TemplaVoila

I have a blog-like part of an page using TYPO3 / TemplaVoila. There are articles that should show up summarized on a single page, but have their own pages / URLs each one too.
However, having the editors add a page AND a flexible content element for each entry is complicated.
So is it possible by some typoscript to have a page, showing a single content element from some other page, sporting a proper URL without having to setup an extra page for each element?
What you want is doable without TV and with other records than tt_content.
e.g.: ext:news does it: the content are news records, which are shown with plugins in list- and detail-mode.
Of course you can reinvent the complete logic of such an extension so you can do it with tt_content records, which could be stored in the usual way scattered on multiple pages.
But the logic is clearer if there only is one page (or very few pages which represent some categorization) where special records are stored.
Plugins would be configured to show only selected records (from one category, which are marked top, which are current, ...) and you have one page (one for all and not for each news one) where the records are shown in detail.
Also each has it's own URL, either with URL-parameter (by default) or you configure realurl (or similar) to build a "real url" from news title (and uid).

TYPO3 - Multi-Domain-Installation

Does anybody have sophisticated knowledge about running a multi-domain-site using a single typo3-instance ?
E.g. I have 2 domains, both being served by the same webserver, using different vhosts. What I want to achieve, is both vhosts pointing to the same document root, where a typo3-instance is installed. This TYPO3-instance should check by typoscript, which domain was used in the request and forward requests for each domain to a specific subpage ("landing page for that domain").
I need this to work in a productional & stable environment, due to custom-self-developed extensions, which provide necessary data for both installations, also specific extbase-domain-models should be usable in both domains etc.
I am already able to check the requested domain via typoscript-conditions. What I am missing, is some info, about how I could possibly realize the redirection, without the client being redirected to the landing page each time while using sub-pages of the landing-page. Do I need to set cookies for this !?
Thanks in advance, Oliver
In TYPO3, you can combine several sites (each with a different domain) in one Installation. This already works out of the box.
So, for this requirement
This TYPO3-instance should check by typoscript, which domain was used in the request and forward requests for each domain to a specific subpage
it is not necessary to add a check for TypoScript, TYPO3 will automatically resolve the URLs.
Page Tree:
pid=0
| --> root page 1
| --> root page 2
On both root pages, enter page properties : "Behaviour" checkmark enable "Use as Root page"
On both root pages, create a TypoScript template, edit it, got to tab "Options", checkmark "Rootlevel". Have this TypoScript template include your general TypoScript configuration, e.g. via "static includes" (ideally you put your TypoScript configuration in an extension)
Since TYPO3 9: configure a site for each page tree under "Site Management > Sites". Before TYPO3 9: On both root pages create a "Domain" record

tx_news direct link to news entry

it is possible to have a direct path to a special news entry?
example:
my link is: http://www.domain.de/start/topnewsdetail/news/really-long-name-of-news-entry.html
and it would be nice to have
http://www.domain.de/newsEntry.html.
Can someone give a hint?
it is a little bit complicated if you want a general automatic solution.
you can do it by hand if you insert pages of type 'external url' where you insert the long path as external url.
with realurl you have problems as realurl at least will use one path segment for the page with the detail view before the last segment which is for identifying the news record. AFAIK coolurl can ommit the path segemnt for the page.
on the other hand: make sure the news identification (title, subtitle?) is unique and does not collide with pathes for normal pages.
at last you can use .htaccess rewrites, but that needs to differentiate between short urls for news and short urls for top-level pages. So those urls will show the page, those urls are not generated inside of TYPO3 and so nowhere used (except manual)
this EXT. adds a custom link to records like system category or news:
https://typo3.org/extensions/repository/view/recordlink
It'S deployed for TYPO3 6.2 but perhabs it'S helpful to create an own EXT.?

Entity Property in URL and SEO

I have coded my ASP.NET MVC application in a way that allows stored entities to be retrieved via a friendly name in the URL, for example:
www.mysite.com/artists/james-brown/songs
Where james-brown is a URL friendly string stored on my Artist entity.
Now imagine I add an artist that no one has heard of before, and no one ever navigated to that artist's songs page.
How would Google/Yahoo/Other Search Engines know that my site does indeed have songs for that unknown artist.
Do I create a sitemap and maintain it through code as I add / remove artists?
There are few defined known ways to make the new links visible to search engine world.
XML and HTML Sitemap:
Add it to sitemap and submit it through webmaster tools.
HTML sitemaps are another way to achieve it. If your site has footer sitemap, you can add it to them.
Internal Links
Create internal links from your high ranking pages or highly crawled pages to the new pages. Google and other search engines tend to crawl pages where the content changes frequently. So if you have a refreshed content pages, try adding it to those pages and chances are high for those pages to be discovered quickly.
External Links
Create links from external blogs, company blogs and sites like pagetube.org which can help it to be discovered.
Yeah just add them to either sitemap, internal or even external links