Nico Knoll Posted December 21, 2014 Author Share Posted December 21, 2014 I fixed this bug and changed how customs are rendered. So now they will overwrite existing meta tags if they have the same key. That means: I won't add a special "robots" field to pages, but if you define "robots := index,follow" in the custom area, that will overwrite config settings. Guess that should do the job, too. Link to comment Share on other sites More sharing options...
Nico Knoll Posted December 21, 2014 Author Share Posted December 21, 2014 And some more minor changes: I switched to PHP_EOL instead of \n and \n\r, which should solve the double line break issue. And I added a option, to add a whitespace at the beginning if automatically inserted. (will publish it in 10min) 1 Link to comment Share on other sites More sharing options...
NorbertH Posted December 21, 2014 Share Posted December 21, 2014 That means: I won't add a special "robots" field to pages, but if you define "robots := index,follow" in the custom area, that will overwrite config settings. Guess that should do the job, too. Good idea! And some more minor changes: I switched to PHP_EOL instead of \n and \n\r, which should solve the double line break issue. And I added a option, to add a whitespace at the beginning if automatically inserted. (will publish it in 10min) Even more good ideas 1 Link to comment Share on other sites More sharing options...
NorbertH Posted December 21, 2014 Share Posted December 21, 2014 Even more questions ;-) After a short look into the source i found : seo_tab seo_tab_END seo_title seo_keywords seo_description seo_custom seo_image seo_canonical As accessible fields in the Template when using manual mode ? How do i access things like the generated Open Graph or Twitter Cards or maybe the Robots setting? Are they added to Custom ? Link to comment Share on other sites More sharing options...
Nico Knoll Posted December 21, 2014 Author Share Posted December 21, 2014 Everything rendered should be available through $page->seo->... (More complicated keys like "og:site_name" are available through $page->seo->{"og:site_name"}) 1 Link to comment Share on other sites More sharing options...
NorbertH Posted December 21, 2014 Share Posted December 21, 2014 Great ! Link to comment Share on other sites More sharing options...
remove Posted December 21, 2014 Share Posted December 21, 2014 @ Nico I believe the Google Preview shows the wrong path. Underneath the title the path of the admin page shows in stead of front end url. Link to comment Share on other sites More sharing options...
Nico Knoll Posted December 21, 2014 Author Share Posted December 21, 2014 @toothpaste: Thanks! I fixed it now Link to comment Share on other sites More sharing options...
remove Posted December 22, 2014 Share Posted December 22, 2014 @Nico: Thx! Can you also take look at this part: When you fill in the Twitter Username, it prints in the metatags correctly. But when you visit another page and go back to the modules settings page, the field of Twitter Username is empty! Link to comment Share on other sites More sharing options...
Nico Knoll Posted December 22, 2014 Author Share Posted December 22, 2014 Fixed it 3 Link to comment Share on other sites More sharing options...
NorbertH Posted December 22, 2014 Share Posted December 22, 2014 Getting this nice little error (see screenshot) The image_main of this template actually is just a single image so i guess $main_image does not return the array or object your functions expects. Plus the "Formated value" of this field is set to "single item(null if empty)" in field settings. But i am not sure if this is the reason ? Edit: I used the image_main field as fallback for seo_url in module settings , even if this is not wanted for as one is a plaintext(url) field and the other is an image field , i think a fatal error should not happen. Link to comment Share on other sites More sharing options...
Gideon So Posted December 27, 2014 Share Posted December 27, 2014 NorbertH,I get the same error as well. Can anybody help to fix this error??? Gideon Link to comment Share on other sites More sharing options...
Nico Knoll Posted December 27, 2014 Author Share Posted December 27, 2014 Don't worry - I'll take a look later on today Don't worry - I'll take a look later on today Link to comment Share on other sites More sharing options...
ceberlin Posted December 28, 2014 Share Posted December 28, 2014 Hi Nico, I tried your module today, installed version 030 first from a previous download, then upgraded to the current version 060. After that I tried to uninstall the module to try that out and got an error: Catchable fatal error: Argument 1 passed to Fields::___delete() must implement interface Saveable, null given in /mypath/wire/core/Fields.php on line 265 Link to comment Share on other sites More sharing options...
Nico Knoll Posted December 28, 2014 Author Share Posted December 28, 2014 Hey - the problem is that there are no fields to delete if only updated and not installed. 0.3.0 is not compatible to 0.6.0 and I think the best thing todo is to delete 0.3.0 first and then install 0.6.0. (Still beta until 1.0.0). In your case you just have to comment the uninstall method out or delete it completely from the module's file. @everyone with the other bug: I manged to get it working today. Need to do some more test and will upload it tomorrow. Link to comment Share on other sites More sharing options...
ceberlin Posted December 28, 2014 Share Posted December 28, 2014 I deleted the module directly from the database and installed it again. Yes: install/uninstall is fine when doing a fresh, clean install. The update was the problem. Link to comment Share on other sites More sharing options...
Nico Knoll Posted December 29, 2014 Author Share Posted December 29, 2014 Okay @NorbertH: I updated the module. Could you try it and tell me if the bug is fixed? Link to comment Share on other sites More sharing options...
NorbertH Posted December 30, 2014 Share Posted December 30, 2014 Everything looks ok now 1 Link to comment Share on other sites More sharing options...
peterfoeng Posted January 20, 2015 Share Posted January 20, 2015 Hi Nico, Just found out about this module! I'm going to give a spin tomorrow I guess I was away a little bit too long from the forum.... 1 Link to comment Share on other sites More sharing options...
Frank Vèssia Posted January 21, 2015 Share Posted January 21, 2015 Nico, I'm using your module in many sites, it's great...but just one think, what about pagination? I would like to add something like {pageNum} or similar into title format like {title} - {sitename} - {pageNum} Other idea: what about having a title format based on template? I have a photo website and and I would like to create custom title for each photo, I cannot edit each photo one by one, right now I detect the template in my head.inc and for those pages I add a custom title but could be nice having something inside your moduleexample:I have "picture" template and I would like the title as:{phototitle} - This is a Photo by {author} for category {category.title}where phototitle & author & (category is a pagefield so I can access other data like title)are fields of picture template Link to comment Share on other sites More sharing options...
Nico Knoll Posted January 21, 2015 Author Share Posted January 21, 2015 PageNum makes sense to me but how do I find out the actual page number? Only by getting "page" from the url? For your picture profile I would recommend to disable "auto title" and just to do it like this in your picture template: <?php $custom_title = $page->title.' - This is a Photo by '.$page->user->title.' for category '.$page->category->title; include 'head.inc'; . . . And in your head something like: <title><?php ((isset($custom_title)) ? $custom_title : (($page->seo->title != '') ? $page->seo->title : $page->title. ' - '.'My cool Webseite')); ?></title> 1 Link to comment Share on other sites More sharing options...
Mike Rockett Posted January 23, 2015 Share Posted January 23, 2015 Nico, when I set a title in the SEO tab, the preview doesn't update according to the default title setting... So, the preview won't match up. Also, is it no longer possible to set different titles? The site title format is now applying to both the page title and the SEO title. Is this by design? Link to comment Share on other sites More sharing options...
Nico Knoll Posted January 23, 2015 Author Share Posted January 23, 2015 Well, there aren't "default title settings". If you leave the seo title field empty it uses the "{titile} - {sitename}" thing. If you put a title into the seo field it shouldn't use "{titile} - {sitename}". I'll take a look at the code. Could you add this as an issue on github? Link to comment Share on other sites More sharing options...
Mike Rockett Posted January 23, 2015 Share Posted January 23, 2015 In the previous version (0.3), the title tag and the og:title tag would differ as, before, the title tag was not automatically inserted. Now, the title field (and not the seo title field) becomes useless when it comes to the title tag, as the seo title field will be used for it if filled out. With the previous version, it did what I expected it to do: insert og:title for me, so that the Google result title would be different. Of course, I entered in my title tag manually, which worked. So, I think that there should be an option to not include the title tag, if someone wants to insert it manually. I'll open an issue regarding making the option available. Link to comment Share on other sites More sharing options...
ceberlin Posted January 23, 2015 Share Posted January 23, 2015 Hi Nico, it's about time for me trying your module. Fist of all: Thank you for sharing! I have a question about the title (or maybe a wish): The title can be pre-filled automatically. I like that. But it is limiting for me. Right now I have a separate field for the window title, called title_window. The reason: This gives me the freedom to name the page differently in the admin (for the page list and selections) and the real title output. The title is filled in by the editor and the title_window is left to set by the seo guy. In case the title_window (SEO) is not set, there is a fallback to the title, when I output the site. (I think that is the way Wordpress handles that too, in combination with the SEO module, if I recall this correctly.) (EDIT: Why an extra field and not the module: I do not like the tab clicking to the SEO area in the normal workflow of an editor. I want the editor to have the title and the SEO title close together. - But this is a matter of taste) Is there a way to mimic that in the module? Select a custom field with a fallback to title? (Of course there are workarounds for me - maybe this idea finds friends in the community But maybe this makes things too complicated. ) And some small thoughts: canonical I would like a comment to the canonical tag field what default you set in case the field is empty. (it is probably the page url without segments and variables?) segments and variable A question is how to handle segments and variables (page numbers) best? I use segments and page numbers for filtering content. To avoid double content I set my templates manually at the moment to set a noindex tag in case a segment or page number is found. I wonder if this is good practice/needed when there is a canonical tag. link rel="alternate" hreflang On my multi-language sites I have something like this: <link rel="alternate" hreflang="en" href="http://mysite.com/en/press/" /> <link rel="alternate" hreflang="es" href="http://mysite.com/es/prensa/" /> <link rel="alternate" hreflang="en-us" href="http://mysite.com/us/press/" /> This links same content in different languages together for Google. Depending on how languages are set up on the site, the module could easily write such code automatically. (Right now I have some hand coded stuff which does exactly that...) EDITED 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now