I was trying to add google tag manager snippet to a drupal 8 page and having some difficulty to add the header tag on a specific page.How to add google tag manager snippet to a specific Drupal 8 page?
May I know where are you adding the snippet? is the code included in html.html.twig?
If so, please declare a variable for the specific page content type in .theme file and use the same in html.html.twig for writing an if condition to include the GTM snippet in that page only.
Related
I use a single drupal8 installation to serve content for multiple website's FAQ section. So I have put some custom tags like "##website_name##" in the html in article content and title. I also have blocks and custom views which display links to other articles like: related articles or popular articles etc.
I want to replace the custom tags with the respective value of the website. Is there any hook present in drupal8 which will be executed on generation of final output html but before sending it to browser so that I can place my replacement login there ?
I have searched for this a hundred times and only found how to add such tags in Blogger. I have not found a tutorial on how to remove those tags if they are added automatically by Blogger / Blogspot.
In my head area of one of my Blogspot blogs using a custom domain, the tag is added automatically as:
<link href='MY_GOOGLE_PLUS_URL' rel='publisher'/>
I try to remove it, but I cannot find the code anywhere in the template. I used the same template code (copy/pasted xml) in some other blog created by the same Google account. The code does not show there.
I have one more custom domain hosted at Blogger but it does not show the publisher tag automatically.
What am I missing?
After a day of messing around I'm answering my own question.
Turns out if we create a blogger blog (with a custom domain in my case) and add that blogger blog to the list of contributed blog in our Google Plus, rel=publisher of that Google Plus id is automatically added. Once I removed the link from my Google Plus, the code in the header:
<link href='MY_GOOGLE_PLUS_URL' rel='publisher'/>
Dissappears !!
just delete
<span class='meta_autor'>
Publisher: <a expr:href='data:post.authorProfileUrl'>
<data:post.author/>
</a><span class='meta_date'> - <data:post.timestamp/></span></span>
In your template search for
<b:include data='blog' name='all-head-content'/>
code. After finding this code remove it then save. Now check your rel="publisher"
tag gone from your theme.
I am very new to facebook platform. I am facing an issue with like button in some of our pages. This is happening on claires.com site
When I test the below URLs through developers.facebook.com/tools/debug page one is working fine and the other one is failing
This URL works fine http://www.claires.com/store/style-files/Leopard-And-Gold/5600037
This one giving me an error http://www.claires.com/store/goods/Teens/cat310104/Drops/p45198/Feather-Fabulosity-Earrings/
When I inspect the source for the both of the pages I am seeing same parameters provided for both pages.
This is the error I am getting for the second url "The page failed to provide a valid list of administrators. It needs to specify the administrators using either a "fb:app_id" meta tag, or using a "fb:admins" meta tag to specify a comma-delimited list of Facebook users."
But I wonder why this error is happening on one page and not happening in the other page, both provides same kind of meta values
Please let me know what went wrong here...
Thanks
-Sujith
You can solve this issue by adding these namespaces to your HTML tag on your website:
<html ... xmlns:og="http://ogp.me/ns#" xmlns:fb="http://www.facebook.com/2008/fbml">
Courtesy of: http://blitzkriegconsultant.blogspot.com/
I'm trying to use stapling to customize sharepoint 2010 blog template. I created a stapling feature and another feature for customizing the the site definition (onet.xml). It's work fine for web parts but if I include List Views it gives an error when I'm trying to activate the "customizing feature" (Not the stapling feature)
Error is,
"Error occurred in deployment step 'Activate Features': Cannot complete this action."
This is the xml snippet which causes this problem. (I couldn't post the xml part here)
http://social.msdn.microsoft.com/Forums/en/sharepoint2010programming/thread/6ba343f3-020b-47e5-938c-aeedcf094adc
BTW I'm trying to customize the default page here and my approach is
1) Get a copy of the existing custom page and rename and include in the feature
2) Change the master page of the above file to custom.master
3) Change the layout of the above page without removing "ContentPlaceHolders"
4) In feature element put module element copied from onet.xml
Appreciate if anyone can provide some insite on this.
Thanks
-Madhawa
Try provisioning the file without the View to make sure that your Url and Path attributes are correct. Once an empty page is displaying, add the View XML back. For the List attribute, try using the relative URL path (ex. Lists/Blog) instead of the template ID.
I want to apply branding to a sharepoint 2010 blog site which is a sub site of our internet. I'm trying to achieve this by creating a custom blog site template based on the original blog site template. So I followed the following blog post.
http://www.sharepointbits.com/blog/sharepoint-2010-custom-site-templates.html
And I got a copy of the blog template files from "C:...\14\TEMPLATE\SiteTemplates\blog", modified the files and put in to the "SiteTemplates\" folder.
I can see a new site template has been created but every time when I create a web site based on my custom template it uses the original blog template files for provisioning (for ex: default.aspx).
Is this the correct way to achieve this? Please let me know if I'm doing sth wrong here.
Thanks in advance.
-Madhawa
Have you created a custom webtemp file in 14\TEMPLATE\1033\XML that has a custom Template Name with a SetupPath that points to your copied folder in SiteTemplates?
Also, the Blog site definition is tricky. The custom lists are built right into the onet.xml file. I wonder if creating a custom copy of the Blog template will work as well as copying other site types would. I would probably use feature stapling to apply custom branding to the out of the box Blog template within your site collection.