How to set the hierarchy design of website in Google Search? [duplicate] - seo

This question already has an answer here:
Google search results site map?
(1 answer)
Closed 6 years ago.
I want to show my product in hierarchy in Google Search like:
I tried keyword like "how to set product list in hierarchy through meta tags", but I did not find what I want.
How can I search this type of question in Google and how to set product design in hierarchy?
As above said this is repeated question but i already told that i tried keyword like how to set product design in hierarchy because i don't know specific keyword for it and i didn't copy it.

Its called as Site Navigation in Schema Markup, which allows you to help in SEO,
Here is the code (microdata) for that
<ul itemscope itemtype="http://www.schema.org/SiteNavigationElement">
<li itemprop="name"><a itemprop="url" href="http://www.example.com/our-advantage">Our Advantage</a></li>
<li itemprop="name"><a itemprop="url" href="http://www.example.com/our-travel-experts">Travel Experts</a></li>
<li itemprop="name"><a itemprop="url" href="http://www.example.com/destinations">Destinations</a></li>
<li itemprop="name"><a itemprop="url" href="http://www.example.com/cruises">Cruises</a></li>
<li itemprop="name"><a itemprop="url" href="http://www.example.com/interests">Interests</a></li>
<li itemprop="name"><a itemprop="url" href="http://www.example.com/explore-your-world/interests/hotels-and-resorts">Hotels</a></li>
<li itemprop="name"><a itemprop="url" href="http://www.example.com/travel-guides">Travel Resources</a></li>
</ul>
and refer the below link for more information
http://searchengineland.com/schema-markup-structured-data-seo-opportunities-site-type-231077

Related

get recordset from xml like html

Microsoft SQL Server. I have an xml:
<div class="list">
<ul>
<li class="nr">5859. </li>
<li class="task">task</li>
<li class="var">Norman</li>
<li class="var">Dave</li>
</ul>
What kind select method should I use to extract result get values in one row, like:
nr, task, var1, var2
You say: I have an xml:
No! You have not! You have HTML!
Many people think, they are the same, at least they look so similar, but HTML is not XML. In your example the missing closing <div>-tag would break any XML based approach...
Taken just the list-definition you might use XML approach:
DECLARE #Xml XMl=
'<ul>
<li class="nr">5859. </li>
<li class="task">task</li>
<li class="var">Norman</li>
<li class="var">Dave</li>
</ul>'
SELECT li.value('#class','nvarchar(max)') AS NodeClass
,li.value('.','nvarchar(max)') AS NodeValue
FROM #xml.nodes('/ul/li') AS A(li)
But I'd really strongly advise not to parse HTML with SQL-Server...
If you can be sure, that the given HTML is XHTML, it is something different. XHTML is HTML with strict compliance of XML standards. In this case, and only in this case!, this is a good approach...
UPDATE: Read the XML given in comment
Two queries:
Fetch all <li> elements (if the count and naming may vary)
Fetch the values side-by-side (if the structure is fix)
Try this
DECLARE #xml XML=
N'<div class="list">
<ul>
<li class="nr">5859. </li>
<li class="task">task</li>
<li class="var">Norman</li>
<li class="var">Dave</li>
</ul>
</div>';
SELECT li.value('#class','nvarchar(max)') AS NodeClass
,li.value('.','nvarchar(max)') AS NodeValue
FROM #xml.nodes('/div/ul/li') AS A(li)
SELECT ul.value('(li[#class="nr"])[1]','nvarchar(max)') AS nr
,ul.value('(li[#class="task"])[1]','nvarchar(max)') AS task
,ul.value('(li[#class="var"])[1]','nvarchar(max)') AS var1
,ul.value('(li[#class="var"])[2]','nvarchar(max)') AS var2
FROM #xml.nodes('/div/ul') AS A(ul)

Robot & Selenium Tree Element Expansion

My supervisor has recently switched us from HP-UFT to Robot with the Selenium Webdriver and I'm finding it extremely difficult to figure out how to use the driver and/or keyword framework to expand a folding tree ul/li webelement.
Below is a stripped out example of the code on the page:
<ul>
<li class="node-class open" id="i1454430045821320">
<a class="" style="" href="">
<ins> </ins>Location Header 1</a>
<ul>
<li class="node-instance leaf" id="i1454430058247421">
<a class="" style="" href="">
<ins> </ins>Location 1</a>
</li>
<li class="node-instance last leaf" id="i14545337159411690">
<a class="" style="" href="">
<ins> </ins>Location 2</a>
</li>
</ul>
</li>
<li class="node-class closed " id="i14544407827351156">
<a class="" style="" href="">
<ins> </ins>Location Header 2</a>
</li>
What I'm trying to do should be extremely simple: I want to expand a specifed closed tree structure if it's classed as closed. Beneath each branch is an optional nested branch, or a selection checkbox. My end goal is to be able to drill down to a location in the tree that the tester specifies and click the end leaf.
Using "Click Element|xpath=/ul/li[a[contains(text(),'Location Header 2')]" does expand the branch but it also selects all of the child node checkboxes.
In UFT, if I hit this kind of problem I'd simply change the parent <li> class to force it open (if I couldn't click or use any of the other methods to drill down and select).
In Robot, I can use the keyword "Get Element Attribute" to READ the class, but I don't see a keyword to CHANGE it so that idea is out. What I'm looking for is a way to expand the tree branches without inadvertently selecting all of the child nodes.
The drilling down through the tree portion I can deal with once I figure out how to open the nodes correctly but opening up the branch without potentially selecting all of the sub-items is making me pound my head into my desk.
I keep thinking that maybe I'm missing something simple. Any assistance on something that I could try would be greatly appreciated.
Figured it out! Thank you all so much for the ideas.
Click Element At Coordinates | xpath=//ul/li[a[contains(text(),'Location Header 2')] | -100 | 0
Luckily all of the ul element columns on the page have the same css style which sets them at 200px width. I figured through trial and error that the "At Coordinates" option clicks from the center of the object (and not the top left as I originally thought). I figured I'd share this in case anyone else ever has a similar problem.

Google star rating for game

Hello i have a site with flash games and i need to add star rating for each game in google search like for amazon 'here' but without review just rating its possible ? google dont punish me for that because its not an article ?
<div itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating">
Rated: <span itemprop="ratingValue">4</span>/<span itemprop="bestRating">5</span>
</div>
I tested the code here https://developers.google.com/structured-data/testing-tool/ but i have error
Thanks
This is an example of a valid code (not related to games, but you'll get the idea). You could test it in the tool:
<div itemscope itemtype="http://schema.org/Product">
<span itemprop="name">Kenmore White 17" Microwave</span>
<div itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating">
Rated <span itemprop="ratingValue">4</span> stars -
Based on <span itemprop="reviewCount">250</span> reviews
</div>
</div>
Now, you can't really put whatever you want there. In order to use the star rating you have to put reviewCount or ratingCount. Those are just mandatory.
There are two problems coming up from the tester
it doesn't know what Thing you are rating, you need to tell it you are rating a game, and what the game is called
you gave a best rating but no ratingCount, how many people rated it? If you don't know set to '1' and use a <meta> tag to hide this
Use this:
<div itemscope itemtype="http://schema.org/VideoGame">
Download
<img alt="Super Game logo" src="/images/screenshots/supergame/cover.jpg"/>
<div itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating">
Rated: <span itemprop="ratingValue">4</span>/<span itemprop="bestRating">5</span>
Based on <span itemprop="ratingCount">1</span> rating(s).
</div>
</div>
The page http://schema.org/VideoGame has more examples, and google may ask for a few more properties like name or headline for the game. Google can suddenly decide things are compulsory when they were not last month.

Microformats Specifically hreview-aggregate

I had a question about microfomats and more specifically hreview-aggregate. A client implemented them a while ago but they are not showing in the SERPs however Google's rich snippet testing tool shows them working perfectly. I took a look at the code and it is currently
<div class="hreview-aggregate">
<div class="rating-45 clearfix">
<span class="rating" title="4.383 of 5 stars">4.383 of 5 stars</span>
<a tabindex="0" href="https://www.example.com/category/" title="View all xxxx Reviews">
<span class="count">View all xxxx Reviews</span>
</a>
</div>
</div>
I changed it up to include class="average" class="best" and a few other spans that they were missing.
<div class="hreview-aggregate">
<div class="rating-45 clearfix">
<span class="rating" title="4.383 of 5 stars"><span class="average">4.383</span> of <span class="best">5</span> stars</span>
<a tabindex="0" href="https://www.example.com/category/" title="View all xxxx Reviews">
View all <span class="count">xxxx</span> Reviews
</a>
</div>
</div>
Will the updated code finally show in the SERPs? Also, the page only has the rating but no reviews, should I use COUNT or VOTES?
I doubt the Google Rich Snippet Tool would pass this. The hreview-aggregate specification (specification) states an item needs to be specified that is being reviewed.
I've also seen the rich snippet tool speak of an average property, but the specification doesn't mention it, if you use value instead of average you comply to the spec and the rich snippet tool picks it up. And you should round the number to one decimal.
You should indeed use votes instead of count if the page doesn't contain any individual reviews.
This is an old question but to those still using hreview-aggregate.
The structure more or less is as follows:
<div class="hreview-aggregate">
<div class="item">
<span class="fn">Item Name</span>
</div>
<div class="rating">
<span class="average">3.5</span>
<span class="best">5</span>
<span class="count">15</span>
</div>
In your code you should have something like this:
<div class="hreview-aggregate">
<div class="item">
<span class="fn">Item Name</span>
</div>
<div class="rating-45 rating clearfix">
<span title="4.383 of 5 stars"><span class="average">4.383</span> of <span class="best">5</span> stars</span>
<a tabindex="0" href="https://www.example.com/category/" title="View all xxxx Reviews">
View all <span class="count">10</span> Reviews
</a>
</div>
</div>
So that it fully validates with: https://search.google.com/structured-data/testing-tool
Should I use COUNT or VOTES?
From the microformat doc itself: http://microformats.org/wiki/hreview-aggregate
count:: This property is used to specify the total number of reviews for the product or service.
votes:: This property is used to specify the total number of users who have rated the product or service, contributing to the average rating. For some sites, the number of votes is equal to the number of reviews, so count may be used and this property omitted.
in your case, see my example with count as I believe this is most applicable to you.
As mentioned before there are several factors that can cause google not to show it.
Google itself says:
When Google finds valid reviews or ratings markup, we may show a rich snippet that includes stars and other summary info from reviews or ratings.
Keyword: MAY
https://developers.google.com/search/docs/data-types/reviews#review-snippets
from my experience they usually do, just make sure its properly formatted and validated.

Breadcrumb microdata help

I'm trying to help Google generate appropriate breadcrumb details for my website. I am currently using this as the breadcrumb:
<div id="breadcrumb">
<span class="crust" itemscope="itemscope" itemtype="http://data-vocabulary.org/Breadcrumb">
<a href="http://www.radonsystems.net" class="crumb" rel="up" itemprop="url">
<span itemprop="title">Home</span>
</a>
<span class="arrow">
<span>ยป</span>
</span>
</span>
<span class="crust" itemscope="itemscope" itemtype="http://data-vocabulary.org/Breadcrumb">
<a href="http://www.radonsystems.net/business/profile.2" class="crumb" rel="up" itemprop="url">
<span itemprop="title">Business Profile</span>
</a>
</span>
</div>
However, this isn't helping Google at all, even the testing tool does not generate the breadrumb link, though it does see the microdata and correctly identifies it as breadcrumb microdata.
Any ideas?
Instead of using the microdata schemas at data-vocabulary.org, I would use the newer ones at http://schema.org which is the joint project by Google, Yahoo and Microsoft. It has a wider range of schemas to be more expressive with your data modeling.
In particular, the webpage schema is what you want for defined breadcrumb microdata.
http://www.schema.org/WebPage
What I did was to add a new column, in which numbers could be entered as format: 1,3,4. Then, I retrieved it from the database, exploded it into an array, and for each number, I'd retrieve information about that link id: url, text, then output it.
If you want to list your pages, you need to create a version that contains enough substance that should be sought.