Sonos music service custom home screen like Spotify - sonos

There is a option to customizing root node with EDITORIAL, GRID, or LIST using presentation map like below
<?xml version="1.0" encoding="UTF-8"?>
<Presentation>
. . .
<PresentationMap type="DisplayType">
<RootNodeDisplayType>
<DisplayMode>GRID</DisplayMode>
</RootNodeDisplayType>
. . .
</PresentationMap>
. . .
</Presentation>
But how show screen like below

We are currently developing the documentation for this experience and will post to our documentation as soon as it becomes available.

Related

Heroku PHP app getting 302 error on some links, not others

I'm migrating a working PHP app from my localhost, XAMPP, to Heroku and a few of my links give me a 302 error and the load page says:
"This page isn’t working
mywebsite.heroku.com sent an invalid response.
ERR_INVALID_REDIRECT"
Here is my code for that particular link:
Admin
Here's the code for another broken link that does the same thing:
Login/Register
HOWEVER, here is the code for the link directly beneath that one that works perfectly:
View Cart
Here's the code that has that variable defined.
$web_url = "https://" . $_ENV["HTTP_HOST"] . "/";
EDIT: I've narrowed it down to links that take users to pages where data is entered. It's an ecommerce website so account registration, login, admin login, and checkout where the user enters billing info and credit card.
I think it has to do with the apache server. I do -not- have an .htaccess file so there's nothing in there that would cause this redirect.
Any ideas are appreciated. I am trying to avoid spending a week reading the entire apache documentation.
would suspect the problem to be here...
$app_path = '/' . $dirs[1] . '/' . $dirs[2] . '/';
which should rather be (due to zero-based indexes):
if(sizeof($dirs) == 2) {
$app_path = '/' . $dirs[0] . '/' . $dirs[1] . '/';
}
better rewrite with mod_rewrite, before the request hits any script.
... and when developing on the localhost, xdebug is a good tool.

How to respond to a JSONP request

I'm trying to setup SSO for a vanilla forum, but I'm confused about the JSONP part. I've tried searching here (StackOverflow) and I've been looking at the vanilla SSO docs, but I still don't understand it.
Got the answer somewhere else.
<?php
echo $_GET['callback'] . "({ \"abc\" : \"xyz\" })";
?>

Yii error load css when using manage url

I have folder resource containing css file. I using registerCssFile and registerScriptFile to load them in components/Controller. I have a trouble when using manage urlManager in config/main . My Page can't load file css and javascript because link change follow controller id.
This is error:
Controller site :
http://localhost/admin/site/resources/css/profile.css ........
controller user :
http://localhost/admin/user/resources/css/theme-blue.css ........
Please help me.
Thank all so much.

Google isn't indexing all the Pages in my Site

In my website i use jquery to dynamically change the primary contents of a div(my primary content) so that pages are not reloading when someone presses a link but it adds content to the div.
Google searches for links in my site and finds only #smth and it does not index the pages.What should i do so that Google will index my other pages?
Any thoughts?
You can add a sitemap.xml file using the Sitemaps protocol to the root of your website (or another location specified in robots.txt). The Sitemaps protocol allows you to inform search engines about URLs on a website that are available for crawling (wiki).
An example sitemap (from referenced wiki above) looks like this:
<?xml version="1.0" encoding="utf-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">
<url>
<loc>http://example.com/</loc>
<lastmod>2006-11-18</lastmod>
<changefreq>daily</changefreq>
<priority>0.8</priority>
</url>
</urlset>
The crawler of a search engine will visit your sitemap.xml and index the locations specified.
I found out that the answer is to add ! in front of your hash urls and configure the server to send a snapshot of the page to google more info here

JSP and Restlets

I developed a simple web servie using restlets . everything s fine i can call a URI and connect to db and do modifications , but when i tried to do the same using jsp s i was not able to get the jsp page itself in the browser . How can i connect a jsp page to this restlet ?
See this stack and the answer from Rich Seller. I personally prefer using Freemarker