TYPO3 8.7 is it possible to output a specific page with multiple url path s - url

I'm trying to integrate a vue.js application into a typo3 page.
I have a full functional TYPO3 instance where I can create own pages, edit the content and more. Now I want to add an existing vue.js application within this page.
Therefore I created an extension which added all necessary resources (js, css) and added an own content type which controls the integrations and configurations. The content type outputs a vue.js entry point. So far everything works. Smaller vue.js applications works as they should.
Now comes the challenge: When I want to create a more complex application which relies on the router functionality, I run into a problem.
Let's assume, I integrate my application into the page /shop and my application tries to render a product under /shop/product/some-id. This doesn't work. The URL processing is done by TYPO3 (as designed).
I tried to find a solution within the documentation but I'm not sure what I should search. I need a way to output the same page (/shop) regardless the following path. Does someone have a hint?

I found a solution. Within TYPO3 v8 is it possible to use the realurl extension for this purpose.
It is possible to define an own decode preprocessing function and analyse the current url.
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl']['decodeSpURL_preProc'][] = RealUrlManipulation::class . '->decodeSpURL_preProc';
Within this method is it possible to change the url for TYPO3 inner processing and set it to an known url.

Related

How to exclude a chunk from VueJS PWA SW precache?

Currently, I have fresh installation of vuejs app with some test pages and components. All my routes and components are using dynamic imports to load js chunks only when user goes to a particular route or a component is rendered and it is working fine in SPA and SSR mode. The problem occurs in PWA mode when it prefetches all chunks at start.
I have tried 'exclude' function but it still pre-fetched the file.
Is there a way to exclude complete routes e.g. /admin to be pre-fetched? As this is only for internal use and not needed for offline usage.
We are using webpack + workbox bundler.
Any help would be highly appreciated.
I edited your question's title to match what you're actually asking. I hope I got it right :)
Yes, that's possible. You can exclude a lazy loaded chunk ("route" or "page" or whatever) from the asset list to be precached.
I assume you're using Vue CLI based project. Look for the PWA config options here https://cli.vuejs.org/config/#pwa. It will lead you to whole config of the Vue CLI PWA plugin here https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-pwa. That will tell you how to pass any options to the underlying workbox-webpack-plugin. What you need is the excludeChunks option, described here https://developers.google.com/web/tools/workbox/modules/workbox-webpack-plugin#full_generatesw_config.

Umbraco URL issue with Vorto

I am using vorto plugin in my Umbraco 7 application to achieve the multilingual capability.
I mentioned the URL in hostname as 'localhost/clientname/en'.
Whenever I open login page the URL which is getting form is 'http://localhost/clientname/en/login'.
This is the structure of vorto URL writing.
But can I achieve it like 'http://localhost/clientname/login/en' ???
I want language names at the end of the URL, not in between.
Is it possible ?
Please help....i am badly stuck in my project task !
It sounds like you need a custom URL provider, setting the domain to 'localhost/clientname/en' will mean that the URLs will always get added AFTER the language part as the host is always the first part of the URL.
Have a look at this article on URL providers and content finders: https://24days.in/umbraco-cms/2014/urlprovider-and-contentfinder/ it's quite old, but it should still work. That should give you an idea of how to make it work. Basically you want the URL provider to append the language to the end of the URL, and the content finder to strip the language from the end and then find the actual content. You can also then set the language of the current thread in the content finder so that Vorto and Umbraco are using the correct language based on the URL.

Different Content/Style in Multitenant Application

What is the preferred way to go for creating a multi-tenant application with angular 4 (or above) as frontend?
I want tenant-specific content to be served via an API (like the stylesheet or a tenant-specific header/navigation) and store it in a database.
Currently, I use aspnetzero but I am stuck with the custom stylesheet. The Css is available at an Url from the backend (aspnetzero) and I get this Url from my abp session. But how do I link this css file without getting FOUC (flash of unstyled content)? Currently, I just use the link tag and set href to an angular-component variable that stores the url to my css file (it is set in ngOnInit). But then i get FOUC.
Maybe my whole architecture is wrong in my attempt. I am definitely open to entirely different approaches!

How to do restful search in Apache Sling

i am evaluating Apache Sling as a potential backend CMS. I like how easy it is to push / get new content via rest. However, I also need to be able to search the content via REST. I compiled all the source code and am running their standalone jar. There are like 100 bundles installed, but I can't find a single rest query.
Some old documentation says you can do /content/mynode.query.json?
But this is not working, and there is no help on whether its supported or not. Honestly the only search option I found was in the console via /.explore.search.html/ which returns web pages.
How can you do restful search using sling?
The JsonQueryServlet, which provides an HTTP search interface was moved to a separate bundle as part of SLING-2226. See that issue's page for how to use it, and there's a related blog post at http://in-the-sling.blogspot.ch/2008/09/how-to-use-json-query-servlet.html

how to create url like example.com/account in gwt application

I need to create a few urls which for my gwt application. e.g currently login screen is
http://127.0.0.1:8888/abc.html?gwt.codesvr=127.0.0.1:9997
http://example.com/abc.html?gwt.codesvr=127.0.0.1:9997
i want to change it to
http://127.0.0.1:8888/accounts
http://example.com/accounts
so when user directly open this link
I have developed this applicatoin in gwt with jdbc
looking forward to your reply
I suggest you take a look at how GWT handles History. You can save states of your application by using History tokens(For ex: ../modulename#user1, ../modulename#user2) and by parsing these tokens you can direct your user to appropriate section of your application. Since GWT applications run on a single html page I beleive this would be the correct approach to implement your functionality. Last but not least these states are bookmarkable and supports browsers back button as well.
By the way about changing the Url, ?gwt.codesvr=127.0.0.1:9997 is added to the url in development mode and will not appear in production mode when you compile deploy your application.
Just create a subfolder named accounts and move the index.html file there. The webserver should not automatically serve the index.html file, when someone requests to see the folder.
You can create the history and add the token in them:
private static final String abc = "account";
History.newItem(abc ,true);

Resources