-
-
Notifications
You must be signed in to change notification settings - Fork 45
If there's no Entry Meta should it fall back to Template Meta? #322
Comments
Yes, it does. Twig > Entry > Template > Global That's the fallback chain. My guess is something isn't right with your template path for the template meta. |
Hi thanks for the response, but, the template path is the correct one. I know this because I've been able to throw an error by changing something in the Template Meta. For instance, I placed {tags} in template meta SEO keywords section and it gave me an error on the correctly affected page. However, I'm unable to override any content. The screen on the left is what I'm trying to use to override the screen on the right. The screen on the right is what's naturally generated by the plugin. What am I missing? Thanks, again! |
Yeah that's definitely what should be happening. |
I'm having this issue as well. I have a couple of pages I'm working on that are not tied to specific entries. I have template metas set up for those templates and the template metas are pointing to the correct template paths (the template for the example is directly inside the templates folder under craft. See screen shots below). If I set up an entry with an SEOMatic field and connect it to the template then the meta renders, but if the template isn't tied to an entry it uses the site default. Also, when I look at the previews of the rendered tags etc. in the control panel those look correct, but when I bring the pages up in the browser the site meta is used, not the template meta. I've included a screenshot of the control panel for one of my template metas, the output of the tag preview in SEOMatic, and the actual code output as seen in Chrome's dev tools. |
I have similar issue. I have added a Template Meta for a page. Everything looks fine in Preview, but it does not override the Site Meta when opened in a browser. I have tried deleting Craft and browser caches and different variants of Template paths but without success. I suspect it may be related to the Template Path. My twig template, products.twig, is located in my templates/contentstructure folder. I have set Template path to contentstructure/products. In Preview the url to the page is https://www.mysite.com/contentstructure/products and the Template Meta is correct, but in a browser the url is https://www.mysite.com/products because I am using the "own URL" option for all entries in the contentstructure section. Could this be the reason it fails and is there a workaround? |
I'm also experiencing this issue. Anyone find a solution yet? |
I'd suggest using a SEOmatic Meta field rather than Template Meta. Add the SEOmatic Meta field to your Section. |
The pages in question are not tied to a CMS entry, I'm experiencing an additional issue too where setting the entry's title field as the default for SEOmatic title are not rendering either (unrelated to template meta). |
So in that case, what I'd suggest is that you set the meta information via Twig, as per: https://github.com/nystudio107/seomatic/wiki/10.-Dynamic-Twig-SEO-Meta |
Cool, that should do the trick. THanks for the quick responses! |
Figured it out! Anyone having this issue should make sure they aren't using file extensions in their path. For the Example: /templates/folder/_file.twig Correct: "folder/_file" Wrong: "/folder/_file.twig" |
So maybe I'm mistaken, but if a user declines or forgets to update SEO information — for example — a blog post, shouldn't that fallback to the template meta and not the site meta? My site is currently not doing that..
The text was updated successfully, but these errors were encountered: