Why google took HTML Select option for description? - meta-tags

If I search for our website www.captaincookresorts.com on google, first result has correct title corresponding homepage title, but description below is total nonsense.
Screenshot here
It's part of one language select's option. There are all informations like meta description, keywords, schema.org tags ..., but google chose this.
Can anybody enlighten me why?

Your option elements look like:
<option value="it"><span class="lang-row sys-disablePropragation" rel="http://it.captaincookresorts.com" onclick="window.location=jQuery(this).attr('rel');" title="Italiano"><span class="langcode">IT</span><span class="ico-flag flag-it"></span></span></option>
Instead, you probably want something like:
<option value="it">Italiano</option>
The content model of option elements is "Text", so they can’t contain HTML/JavaScript.

Related

Locating Work items which have comments addressed to me?

In Azure DevOps is possible to #Tag a user in the comments of a work item. Is it possible to query the items to find the work items which have comments which I am tagged in?
Write a query that does a Contains Words on History, then use "#display name"
Use the Work items page and select "Mentioned" from the dropdown.
URL would look like: https://dev.azure.com/*YOURORG*/*YOURPROJECT*/_workitems/mentioned/
Note that this also picks up mentions in other fields such as description, but I find this to be the easiest way.
"Work items" Page
Mentioned" dropdown
Note the number of comments. If there are no comments, then clearly you weren't mentioned in a comment.
Sort by "Mentioned Date". Latest occurrence by default.
You can make a custom query just setting the ID in #RecentMentions like this:

Microdata Rich snippets review & photo

Is there any possibility to show a photo of a reviewed Person in the google search result of a review aggregate just like in a recipe?
http://www.google.com/help/hc/images/webmasters_173379_en.png
I have a div with itemscope itemtype="http://data-vocabulary.org/Review-aggregate" and all relevant data marked up inside including an img with a profile-photo marked like this:
<img itemprop="photo" ...
In google developer´s rich snippet testing tool I see all that information including the photo and its path, but the preview search result only contains the rating stars and stuff like recent review text, pubDate and author, while in the specs on schema.org it doesn't look like there's another solution.
Is there any solution? Thanks and sorry for my English.
Please read carefully this manual:
https://support.google.com/webmasters/answer/146645
You can find there that photo property is for the item being reviewed, not for reviewer.
Aggregate review is for average rating. Reviewed person is actual for individual reviews.

Orchard Create Projection or Search Based on Filtered Dropdown Selections

I have, what I think is, a simple feature that I am trying to add to my Orchard (1.6) site, but I can't find any tutorials or instructions on how to do it. I have a custom type called "Office" and each office has a custom field called "State" indicating which state the office is in. I actually designed my Offices as a custom part in code with specific properties such as State on it, but I "think" it's the same as if I added the State through the Admin interface as a field on the Office content part.
Now, I can create a basic projection to show all the offices with a simple filter of "Content with type Office" to display all offices. However, what I want to do now is to have a drop down list at the top of the page that says "Filter by: [-SELECT STATE-]" with a list of all 50 states. When the user selects a state, the page should refresh and display just the offices in that state.
This is where I'm stuck. Should I do this through the code, or can I do this through the Admin UI? If through the code, should I model it after the Orchard.Search module (which I tried to do, but I am completely lost). If I can do it through the UI, do I use projections? If so, do I have to create 50 separate projections (one for each state)? That seems extremely time consuming to create and maintain.
Any help is GREATLY appreciated!
FYI, the site at http://ktowneric.com/listings/search (which uses Orchard) is very similar what I am looking for, and the developer stated he used projections, but I can't seem to figure out how he did it.
You can definitely use a projection. If you notice when you use the search function on the page you referenced, the inputs are formed into query string values. You can use tokens to grab the values from query strings to use in your projection filter. For example, if you're using fields as you stated, then you just add a filter for that field and in the value field use {Request.QueryString:State}. Or, replace "State" with whatever key you're using for the query string value.
That solves your projection issue. You will need to build a search form that would look something like this...
<form action="/search-results" method="Get">
<select name="State">
<option value="OH">Ohio</option>
...all the states...
</select>
<input type="submit" value="Search" />
</form>
"/search-results" could be a projection page or any content that has the projection widget present. You could build the form as a widget that you can place somewhere, or for testing purposes, you could just paste this html into an html widget to try it out.

How browser's "suggestion list" works?

Many websites use <input type='text'> element to get simple text data from their customers. You can configure your browser to remember the values you enter into these fields, so that it can suggest you back a list of values, to speed up your data entry experience.
However, I'm seeing a strange behavior. On some fields of the same type, browser doesn't suggest anything, or suggests a different list from other fields. I've checked all fields and all of them are of the same <input type='text'> type.
Does anybody know how browser differentiates between different lists (or no list) for the same HTML form control?
There's an attribute on form elements that allows them to semantically specify their intended content (I believe its the V_Card attribute).
The following page gives a brief explanation and a table of acceptable values:
http://microformats.org/wiki/hcard-input-formats

"Then I should see" Capybara step is being too specific about scope

My page has a <th> tag that has "attendance" as its CSS class. The following Cucumber step fails:
Then I should see "Name" within "th"
while this one passes:
Then I should see "Name" within "th.attendance"
Do I really have to use this level of specificity? I feel like, for Cucumber, that's requiring too much knowledge of the underlying code being tested and it should be a bit more generic.
In other words, how would I say "Just find '[value]' within any 'th' tag"? And am I wrong for wanting to do so?
Try the following. It finds the given text within the given selector, using xpath.
"//#{selector}" means that it should find tag that matches the selector.
"[contains(text(),'#{text}']" means that the tag text should contain the given text.
Then /^I should see "([^"]*)" within "([^"]*)"$/ do |text, selector|
find(:xpath, "//#{selector}[contains(text(),'#{text}')]").should_not(be_nil, "Could not find the text '#{text}' within the selector '#{selector}'")
end

Resources