Neu NO FOLLOW bei Funktionsattribut - ist es so richtig?

mona

Sehr aktives Mitglied
26. April 2016
308
25
Hallo liebe Forenmitglieder

Shop 5, Nova-Template

Ich möchte Artikel mit dem Funktionsattribut unverkäuflich nicht in der Suchmaschine auffindbar machen - habe im header.tpl folgendes bei meta name="robots" ergänzt

Code:
            <meta name="robots" content="{if $robotsContent}{$robotsContent}{elseif $noindex || (isset($Artikel->FunktionsAttribute.unverkaeuflich)
                           && $Artikel->FunktionsAttribute.unverkaeuflich|@strlen > 0)}
                          noindex{else}index, follow{/if}">

Müsste so funktionieren oder?
Besten Dank
gruss
mona
 
Zuletzt bearbeitet:

MHillmann

Moderator
Mitarbeiter
11. Oktober 2018
1.372
543
Hallo,

wenn das nicht geht, probier es mal so:
Code:
$Artikel->FunktionsAttribute[$smarty.const.FKT_ATTRIBUT_UNVERKAEUFLICH]

Viele Grüße
Michael
 
  • Gefällt mir
Reaktionen: mona

mona

Sehr aktives Mitglied
26. April 2016
308
25
Hallo Michael

Besten Dank. So meinst Du ....isset($Artikel->FunktionsAttribute[$smarty.const.FKT_ATTRIBUT_UNVERKAEUFLICH])..... ?
Wie kann ich sofort testen, ob es funktioniert?

danke & gruss
mona
 

deliman

Sehr aktives Mitglied
13. Februar 2016
1.069
132
Hallo,

welche Lösung hat funktioniert? Ich habe auch gerade das Problem, das ich Artikel erstelle, die aber nicht indexiert werden sollen (im Moment noch im 4er Shop).
 

mona

Sehr aktives Mitglied
26. April 2016
308
25
Hallo
Musste es zuerst wieder suchen...so habe ichs gemacht (und im robots auch noch einen Ausschluss reingeschrieben)

<meta name="robots" content="{if $robotsContent}{$robotsContent}{elseif $noindex || (isset($Artikel->FunktionsAttribute[$smarty.const.FKT_ATTRIBUT_UNVERKAEUFLICH]) &&
$Artikel->FunktionsAttribute[$smarty.const.FKT_ATTRIBUT_UNVERKAEUFLICH] == TRUE)}noindex{else}index, follow{/if}">
 

Ähnliche Themen