Kentico meta data information - kentico

Using a Head HTML code webpart, i'm adding OG meta data:
<meta property="og:title" content="{% CurrentDocument.DocumentName #%}" />
<meta property="og:type" content="article" />
<meta property="og:url" content="{% CurrentDocument.AbsoluteURL #%}" />
<meta property="og:description" content="{% StripTags(CurrentDocument.Summary) #%}" />
How would i then change the current title and standard description tag?

On your parent page for example /blog set the page title and description under Properties>Metadata using a macro. Then on the sub-pages let it automatically inherit that content. Take a look at this macro for the page description:
{% if(CurrentDocument.ClassName == "cms.blogpost"){BlogPostSummary}else{"Kentico MVP Brenden Kehren talks about Kentico how tos, provides code samples and education and just life in general."} #%}
What's happening here is the macro is checking the current page's class and if it's a blog post, then it uses the BlogPostSummary field and sets the description using that, otherwise if it's a blog or blog month, it uses the other text.
There should be no need to manually set those on each page unless you really have crazy SEO requirements. Even if so, you can create fields in your page type for those and still dynamically set them vs. manually set each one under metadata.

Are you looking for changing title and description HTML tags by a web part or just configuring it for some page?
If you just want to configure title and description of the HTML page then you can just select the document in the Pages application and then go to Properties -> Metadata. Documentation for that is here
If you are looking to somehow change the title and description by a web part then you would actually need to develop a custom web part and access the current page title of the page in code behind. Something like this works.

Even using the selected item transformation, transformatted item is a page from your content tree and as such has the Properties -> Metadata section. Moreover, titles and descriptions are inherited by default so you can just change or odd macros to their parent and it changes the title and description for pages in your selected transformation.

Related

Set Windows Timeline Card for Website

Is it possible for Websites to define the Image/Title - or even the whole Aadaptive Card - to be shown in the Windows Timeline when they are added by Edge.
Yes, it looks like. Not sure about all the rules - but just by reverse engineering a bit on an image I saw on my Timeline history contributed from Edge for a random page like https://github.com/metabase/metabase/blob/master/test/metabase/test_setup.clj
If you inspect the source code for that page you'll see:
<meta>
...
<meta property="og:image" content="https://avatars3.githubusercontent.com/u/10520629?s=400&v=4" />
...
<meta property="og:title" content="metabase/metabase" />
....
That corresponds to what I get rendered as background image and title on the Timeline card. The og:<something> meta properties are defined by the Open Graph protocol: http://ogp.me/

Code in Header to allow Subtome Button in Browser to find feed

By using the following code in header, I have managed for the rss button in url bar in browser to successful find my feed.
<link rel="alternate" type="application/rss+xml" title="Blog Title" href="http://www.weeblysite.com/1/feed" />
However, the subtome button on browser fails to locate feed. Therefore Feedly, Digg Reader, etc, finds no feed.
How can I implement code in my Weebly generated site to allow all such browser buttons to pick up and subscribe to feed?
Thank you.
Nicholas Boyd Crutchley
http://www.nicholasboydcrutchley.com/infin-story
this is a new blog.. no post...but the old blog has same problem..
The problem comes from the fact that your page has a broken discovery mechanism.
Right now in the <head> section of your HTML page, I can see this:
<link rel='alternate' type='application/rss+xml' title='RSS 2.0' href='http:////feed' />
And clearly, http:////feed is not the right feed url :) You want to have this:
<link rel='alternate' type='application/rss+xml' title='RSS 2.0' href='http://www.nicholasboydcrutchley.com/1/feed' />
And everything should be smooth!

Is there a pagination links microdata entry?

There is a microdata for breadcrumb links: http://www.data-vocabulary.org/Breadcrumb/
But is there a similar microdata for page links, like:
[<-] 3 4 5[prev] 6[current] 7[next] 8 9 10 11 [->]
Yes, there's the pagination attribute for the Article item, for instance..
But for collection pages there's no direct way, at least not that I know of. Thees sort of pages are often not ment for indexation anyway. But if you feel strongly about it...
1.) Schema.org / SiteNavigationElement
You could use Schema.org's SiteNavigationElement and extend it as a pagination element:
Example:
<!-- The container for your pagination markup -->
<div itemscope itemtype="http://schema.org/SiteNavigationElement/Pagination">
...
2.) Schema.org / WebPage / relatedLink
A link related to this web page, for example to other related web
pages.
The WebPage item has an attribute called relatedLink that arguably could be used for pagination purposes. Use CollectionPage, that's an extension of the WebPage item, and you still be able to state that there's related pages. This property could also be extended to achieve an higher semantic:
Example
<!-- The pagination link -->
<a itemprop="relatedLink/pagination" href="...">...</a>
The Relation attribute
Also, have a look at rel="next" and rel="prev" to accomplish a markup that touches the subject.
Example:
...
<head>
<link rel="prev" href="http://www.example.com/article?story=abc&page=1" />
<link rel="next" href="http://www.example.com/article?story=abc&page=3" />
...
Have a look at Google Webmaster Central Blog or WHATWG for additional information.

Google Plus not reading from meta tags

Below are the meta tags I am using for Google plus
<html itemscope itemtype="http://schema.org/Watch Movies Online">
<meta itemprop="name" content="Watch Movies"/>
<meta itemprop="description" content="Watch Movies Online">
<meta itemprop="image" content="https://www22.verizon.com/images/biglogo.gif" />
I see them in view source of the page. when I actually click G+ button, it is not reading the values from here. Not able to figure out what I am missing.. Pls suggest me...
The itemtype that you've specified does not appear to be a valid one. Please note that you can only use types specified by schema.org. Please change the type to a valid one and try again.
Apart from that, it would be good if you can specify the URL of your site where it's not working. Furthermore, you can use the Google Rich Snippets testing tool to test your site. This might help tracking down the problem you're having.
You have to add the following snippet at the top of the document or add to your definition:
<html itemscope itemtype="http://schema.org/**yourschematypegoeshere**">
Where you replace "yourschematypegoeshere" with one of these, http://schema.org/docs/full.html.

Relative URLs in Sharepoint master page

I have a master page with tabs. The tabs are defined by the following sitemap file:
<siteMap>
<siteMapNode title="Home" url="~/" >
<siteMapNode title="Schedule" url="~/Pages/Tab2.aspx"/>
<siteMapNode title="Deliverables" url="~/Pages/Tab3.aspx"/>
<siteMapNode title="My Items" url="~/Pages/Tab4.aspx"/>
<siteMapNode title="Management" url="~/Pages/Tab5.aspx"/>
<siteMapNode title="Working Docs" url="~/Pages/Tab6.aspx"/>
</siteMapNode>
</siteMap>
The problem is that on my subsites, clicking on a tab keeps taking me back to the root. For example, I want the schedule link to go to http://Server/Subsite/Pages/Tab2.aspx. Instead, what I am getting is http://Server/Pages/Tab2.aspx. I read that having a tilde at the beginning of the link would solve this problem but it doesn't.
I spent HOURS looking for the answer to this question, and it turns out there IS one, it's just annoying. You can use the ProjectProperty tag in WSS sites AND MOSS sites, and one of the possible parameters for ProjectProperty gives you the subsite's URL.
<SharePoint:ProjectProperty Property="Url" runat="server"/>
That outputs a string literal with the value of the subsite URL. So, for example, you can do this (note that you need to use single-quotes for the src='' or href='' attribute of the actual HTML tag):
<a href='<SharePoint:ProjectProperty Property="Url" runat="server"/>/pages/Tab2.aspx'>
Hope it helps! For a listing of other possible values for ProjectProperty, check out this guy's page (which is where i found my original answer!)
I was looking for an answer to do this for a long time... I want to package my site as a Site Template and having absolute URLs was not an option... I need them to be relative to what ever the site URL is... whether it is at the root of MOSS or a sub-site deep down in the structure...
I found the following to work:
Script Tags:
<script type="text/javascript" src='<asp:Literal runat="server"
Text="<% $SPUrl:~Site/appBin/js/jquery.min.js %>" />'></script>
Style sheet (Method suggested above by user385947):
<link rel="stylesheet" type="text/css"
href="<% $SPUrl:~Site/appBin/css/jquery-ui.css %>" />
Hope this helps others...
You're looking for the ~site token, here's a list of the URL tokens custom to WSS.

Resources