What page should json-ld for LocalBusiness be put on? [duplicate] - web

I'd like to place a Schema.org Organization item on my website.
Should I place the JSON-LD only on the contact page or can I add it to every page of the website? What is the best solution?

With Schema.org, you would typically provide structured data about what is relevant to the current page.
Assuming that it’s the website of the organization, you could specify your Organization as value for these properties:
publisher
(for WebSite, for every WebPage)
about and mainEntity
(for WebSite, for the WebPage on the homepage, for the AboutPage)
author
(for Article, BlogPosting etc.)
(There are more properties, of course. Simply check the type pages for properties that have Organization, or the parent type Thing, as "Expected Type".)
Note that you don’t have to repeat the data, you could simply refer to it instead. Then it would make sense to provide the full data on the page that is given as url of the Organization, so typically the homepage.

According to Google, Organization Schema should be on only 1 page of a website (usually the homepage of contact page).
Source: https://www.searchenginejournal.com/google-do-not-put-organization-schema-markup-on-every-page/289981/

Related

custom title and description of physical web notification

Reply from : https://github.com/google/physical-web/issues/595
For example, I am transmitting www.starbucks.com
http://www.starbucks.com as the URL.
My phone looks for physical web pages and say it detects www.starbucks.com
and shows it to me in my physical web present in my chrome.
As a user, this is how it will appear to me presently
» Now this does not convey much information to me.
» The text "Order while you wait" has been taken from the metadata
description of the page( as far as I know) and the title "Starbucks" *has
been taken from the *title tag.
Now, say if I can custom define these parameters, for example like this
Here, I custom defined the text of the same starbucks URL that my phone's
physical web scanned for.
This adds for relevancy to the URL. A user gets a clear message. Also, it
allows the stores to convey an effective contextual message.
This is possible when you use ReactJS and JSX?, because only you have one HTML file and always show the title default that is in this html, even if you change it with document.title = "other title" in the notification show the first and not the new title
The text shown in the Physical Web notification is strictly given by the target website and you can influence it only there.
The Chrome is actually not analyzing the target website. Its a Google server (Physical Web Service) that analysis it and this one provides information to Chrome. You seem to need changing the title instantly and often. So be careful about caching of already resolved webs on the server.
The website analysis does not execute any Javascript. It takes only what is written in HTML directly. So the trick with document.title wont work.
But there is a different way how to get the notifications. Look at the Google Nearby Notifications. In summary this works based on Eddystone-UID. You register your UID with the service and configure to redirect to target website. But in the configuration you can specify the title and description. Look at the mentioned page for the details.

Proper use of Schema.org "WebSite" type: apply it to all pages or just the home page?

Should the "WebSite" and "Organization" types and their properties be applied to all pages of a website or just the homepage?
I have valid JSON-LD code defining the the necessary items for Google mobile search results, but I am not sure if it should be included on all pages or just the root/home page.
It would make sense to provide it on any page where it’s relevant.
For example, if this is an organization’s website, each page is about/from the organization, so provide metadata about this organization on each of the pages.
A consumer looking for structured data on a certain page is not necessarily also visiting and checking the homepage, so it might never learn that you are providing relevant metadata.
That does not necessarily mean that you should include the full item (with all properties) on each page. It can be sufficient to provide the full item only on one page (e.g., on the site’s homepage), and link to it (for example with the property author) from each other page.

When should I have addresses with #?

When should I have addresses with # and when should I have separate address for each page or part of a page.
For example
https://ca.news.yahoo.com/nick-hornby-boys-read-telling-101350029.html
I know sometimes we need to have #, for instance when we call a javascript method to show a lightbox(modal) but some websites are using it in their unique address of their pages.
For example icloud is using it to show its modal when you click on create one now link.
https://www.icloud.com/#
However, as I said some websites are using that as a method to have unique addresses for their pages.
For example following address that is showing a single page of icloud website.
https://www.icloud.com/#find
Is that correct to follow this practice of having # in our unique address of the website pages similar to what icloud website has?
I am not asking about icloud.com thats just an example. What I meant is that if you go to www.icloud.com/#find page you would see it is not a single page website because there is just a header, login page and a footer. So why they are using #find and not something like find.html? Is there any specific reason that I am missing?
URL fragments(#whatever) are a way to address sup-parts of a document. You should keep in mind that these are never sent to or seen by the server so you can't really use them serverside to differentiate between URLs. You can use them to make parts of a static page addressable or, with the right amount of JS contortions, use them as a foundation for addressable navigation within a single page app. Some JS frameworks rely on this fairly explicitly although with is starting to go out of style as most browsers now support the history api.

Orchard CMS Editable Content on MVC Views

I'm working on an Orchard module for selling an e-book of sorts. Prior to purchase, a user can view a page showing a sample of the product. After purchase, there is no more need for the sample page, and the user has access to the full product.
I would like to set things up such that if a paying customer tries to access the sample page that they would be redirected to their full product and if a non-customer were to try to go to full product page they would be redirected to the sample. I'd also like my page content to be editable via the Dashboard.
My current implementation:
Controller handling the conditional routing / redirecting based on whether a purchase has been made.
A layer rule for each of my page url's each containing an html widget to provide the page content
This seems to work, but I am wondering what other options I have to accomplish this.
You may be making things way more complicated than they need to be.
Using widgets is unnecessary. It would be much better to build a regular content type and display that. You could serve it through a special controller that checks for a purchase, but even that is unnecessary. Instead, you could create a part that would have the purchase verification logic in its driver's display method. This way, you could even apply the exact same logic to any content type.

How can we enable user's thumbnails on their drupal content?

I am going on making a Drupal site matches with my requirement. A requirement describes that on each node, such as Blog or Forum, except publisher's name and published date below the node's title, should show the user's thumbnail (similar to avatar in Facebook or Twitter) too.
I thing there is an existing module for this requirement. but I couldn't find it.
Could you tell me how to do this? some guideline or link to an example? it would be nice if you can tell me the module that is able to do this thing.
you wany to enable picture support: http://drupal.org/node/22271
and in addition, you probaly want to change the theme to call
theme('user_picture', $account);
where you want to display the picture (where $account is the account object of the user that is posting the node/comment)
the corresponding template file is user-picture.tpl.php

Resources