Jump to content

Wanze

PW-Moderators
  • Content Count

    1,076
  • Joined

  • Last visited

  • Days Won

    10

Wanze last won the day on February 6

Wanze had the most liked content!

Community Reputation

1,516 Excellent

2 Followers

About Wanze

  • Rank
    Hero Member
  • Birthday 06/19/1986

Profile Information

  • Gender
    Male
  • Location
    Bern, Switzerland

Recent Profile Visitors

12,607 profile views
  1. Wanze

    SeoMaestro

    The line in question is: $isTranslatable = $info['translatable'] ?? false; The "Null coalescing" operator was introduced with PHP 7 - are you sure you're using PHP 7.2?
  2. Wanze

    SeoMaestro

    Hi @Juergen This should work: $page->seo->robots->noIndex = 1; $page->seo->robots->noFollow = 1; Cheers
  3. Wanze

    SeoMaestro

    Done, thanks for the hint! I was thinking that ProcessWire would update this information regularly?
  4. Wanze

    SeoMaestro

    Version 0.8.0 has been released: Adds facebook share preview for content editors when editing Opengraph meta data Adds support to extend the rendered meta title with additional information such as the domain or site name (#11) Renders structured data (JSON-LD) for breadcrumbs via new group "structuredData" (#10) Adds new meta group "structuredData" which will handle more types of structured data in the future Happy weekend everyone! Cheers
  5. Wanze

    SeoMaestro

    I just released version 0.7.0 of the module: It fixes the ugly label being showed above the "inhterit" checkbox for newer Processwire versions. I think there is a bug in core, because ProcessWire ignores the fact that the label is marked as "hidden". I had to fix it via CSS for now. Added the possibility to resize the Opengraph image when referencing a page image by specifying a width and/or height. Opengraph image: If the referenced image field is empty and pulls the image from another page (default value), the module now substitutes the default image as well. Other than that the readme now contains a chapter for the various hooks provided by SeoMaestro. This might be interesting if you need to customize the behaviour of the module. Please let me know if you find any issues! Cheers
  6. Wanze

    SeoMaestro

    I was referring to your example on how to apply a truncate function within the placeholder: {field|truncate:200} This would be nice but requires a custom implementation because the placeholder-parser of ProcessWire cannot handle this expression. If we had a more sophisticated template engine available, this would be an easy task
  7. Wanze

    SeoMaestro

    @Mikie The module does not truncate any texts, I can see this as an additional setting on field level. The truncate filter looks good, but the used function to parse the expression of ProcessWire does not support this kind of filters. Would be way easier if this could be left to a template engine One solution would be to use a hook to truncate the text when rendering: $wire->addHookAfter('SeoMaestro::renderSeoDataValue', function (HookEvent $event) { $group = $event->arguments(0); $name = $event->arguments(1); $value = $event->arguments(2); if ($group === 'meta' && $name === 'description') { $event->return = substr($value, 0, 200); } }); Cheers
  8. Wanze

    SeoMaestro

    @3fingers Did you try if it works? I think it won't because the module currently expects an image field on the page, it cannot resolve nested fields. For text based placeholders, this should work, as the module uses ProcessWire's wirePopulateStringTags function which supports nested WireData objects. One solution would be the one mentioned by @Mikie: To populate the og image URL from your matrix field when saving the page, via hook. Another possibility is to use a hook provided by the module to modify the OG image url when being rendered, check out the following issue and the linked test cases for the hooks: https://github.com/wanze/SeoMaestro/issues/8 Cheers
  9. Wanze

    SeoMaestro

    @Peter Knight That's because the opposite (index,follow) is assumed by default and you do not need the meta tags at all in this case. The module does only render them if you have checked at least one (noindex or nofollow).
  10. Wanze

    SeoMaestro

    @Juergen I think that a hacker will easily find other ways to determine the underlying CMS by inspecting the markup or headers (or https://builtwith.com/). But I see your point For now, you can use a hook to disable the generator tag: $wire->addHookAfter('SeoMaestro::renderMetatags', function (HookEvent $event) { $tags = $event->arguments(0); $group = $event->arguments(1); if ($group === null) { unset($tags['meta_generator']); $event->return = $tags; } }); Feel free to open a feature request on GitHub. Cheers
  11. Wanze

    SeoMaestro

    @Juergen @Peter Knight There is a render() method for any "group", but in case of the robots it will only return something if at least one option (noIndex, noFollow) is checked. Your example to access the individual data is correct, you can also use the following syntax, which looks slightly nicer: $page->seo->robots->noIndex Cheers
  12. Wanze

    SeoMaestro

    @Juergen What version of ProcessWire and which AdminTheme are you using?
  13. Wanze

    SeoMaestro

    Hi @Peter Knight, $page->seo->robots->render() should work fine, but it only outputs the tags if you have checked any of the noIndex or noFollow options. Cheers
  14. Wanze

    SeoMaestro

    @Peter Knight This is currently only possible with a hook, check out the following test case: https://github.com/wanze/SeoMaestro/blob/master/tests/src/SeoMaestroTest.php#L119-L129 But this would make a nice feature, either in the module config or configurable per field. Could you open a feature request on GitHub? Thanks Cheers
  15. Wanze

    SeoMaestro

    @alexmercenary This bug has been fixed with version 0.5.0, see https://github.com/wanze/SeoMaestro/blob/master/CHANGELOG.md#050---2019-02-17
×
×
  • Create New...