Data ExplorerListe des donnéesGadgets

data:posts[i].labels[j].url

Description Statut Data Type Gadget Gadget Version
Donnée du gadget Blog issue des tableaux imbriqués posts[i].labels[j], contenant les url des libellés attribués aux articles.
courant
url
Blog
1
2

Ressources

"data": {
  "widget": {
    "type": "Blog",
    "version": 1 | 2
  },
  "posts": [{
    "labels": [{
      "url": URL,
        {
          "canonical": URL,
          "http": URL,
          "https": URL,
          "size": number,
          "length": number,
          "escaped": string,
          "jsEscaped": string,
          "jsonEscaped": string,
          "cssEscaped": string
        }
    }]
  }]
}

Conditions

  • Ne peut être employée que dans le code XML du gadget Blog.
  • Donnée issue du tableau labels imbriqué dans le tableau posts.
  • Disponible uniquement sur les pages archive, index et item.

Valeur

  • Donnée de type URL + héritage type String
  • URL du libellé.

Extraction explicite

Méthode 1 : Dans une boucle
<b:loop values='data:posts' var='VARIABLE_NAME_POSTS'>

  <b:loop values='data:VARIABLE_NAME_POSTS.labels' var='VARIABLE_NAME_LABELS'>

    <data:VARIABLE_NAME_LABELS.url/>

  </b:loop>

</b:loop>

Méthode 2 : Par l'indice
<b:loop values='data:posts' var='VARIABLE_NAME_POSTS'>

  <b:eval expr='data:VARIABLE_NAME_POSTS.labels[0].url'/>

</b:loop>

Méthode 3 : Premier set
<b:loop values='data:posts' var='VARIABLE_NAME_POSTS'>

  <data:VARIABLE_NAME_POSTS.labels.first.url/>

</b:loop>

Méthode 4 : Dernier set
<b:loop values='data:posts' var='VARIABLE_NAME_POSTS'>

  <data:VARIABLE_NAME_POSTS.labels.last.url/>

</b:loop>

Protocoles et URL canonique

URL courante HTTPS
<b:loop values='data:posts' var='VARIABLE_NAME_POSTS'>

  <b:loop values='data:VARIABLE_NAME_POSTS.labels' var='VARIABLE_NAME_LABELS'>

    <data:VARIABLE_NAME_LABELS.url.https/>

  </b:loop>

</b:loop>

URL courante HTTP
<b:loop values='data:posts' var='VARIABLE_NAME_POSTS'>

  <b:loop values='data:VARIABLE_NAME_POSTS.labels' var='VARIABLE_NAME_LABELS'>

    <data:VARIABLE_NAME_LABELS.url.http/>

  </b:loop>

</b:loop>

URL canonique
<b:loop values='data:posts' var='VARIABLE_NAME_POSTS'>

  <b:loop values='data:VARIABLE_NAME_POSTS.labels' var='VARIABLE_NAME_LABELS'>

    <data:VARIABLE_NAME_LABELS.url.canonical/>

  </b:loop>

</b:loop>

URL canonique https
<b:loop values='data:posts' var='VARIABLE_NAME_POSTS'>

  <b:loop values='data:VARIABLE_NAME_POSTS.labels' var='VARIABLE_NAME_LABELS'>

    <data:VARIABLE_NAME_LABELS.url.canonical.https/>

  </b:loop>

</b:loop>

URL canonique http
<b:loop values='data:posts' var='VARIABLE_NAME_POSTS'>

  <b:loop values='data:VARIABLE_NAME_POSTS.labels' var='VARIABLE_NAME_LABELS'>

    <data:VARIABLE_NAME_LABELS.url.canonical.http/>

  </b:loop>

</b:loop>

Longueur de la chaîne

Avec le suffixe Size
<b:loop values='data:posts' var='VARIABLE_NAME_POSTS'>

  <b:loop values='data:VARIABLE_NAME_POSTS.labels' var='VARIABLE_NAME_LABELS'>

    <data:VARIABLE_NAME_LABELS.url.size/>

  </b:loop>

</b:loop>

Avec le suffixe length
<b:loop values='data:posts' var='VARIABLE_NAME_POSTS'>

  <b:loop values='data:VARIABLE_NAME_POSTS.labels' var='VARIABLE_NAME_LABELS'>

    <data:VARIABLE_NAME_LABELS.url.length/>

  </b:loop>

</b:loop>

Échappement de la chaîne

Échappement HTML
<b:loop values='data:posts' var='VARIABLE_NAME_POSTS'>

  <b:loop values='data:VARIABLE_NAME_POSTS.labels' var='VARIABLE_NAME_LABELS'>

    <data:VARIABLE_NAME_LABELS.url.escaped/>

  </b:loop>

</b:loop>

Échappement JS
<b:loop values='data:posts' var='VARIABLE_NAME_POSTS'>

  <b:loop values='data:VARIABLE_NAME_POSTS.labels' var='VARIABLE_NAME_LABELS'>

    <data:VARIABLE_NAME_LABELS.url.jsEscaped/>

  </b:loop>

</b:loop>

Échappement JSON
<b:loop values='data:posts' var='VARIABLE_NAME_POSTS'>

  <b:loop values='data:VARIABLE_NAME_POSTS.labels' var='VARIABLE_NAME_LABELS'>

    <data:VARIABLE_NAME_LABELS.url.jsonEscaped/>

  </b:loop>

</b:loop>

Échappement CSS
<b:loop values='data:posts' var='VARIABLE_NAME_POSTS'>

  <b:loop values='data:VARIABLE_NAME_POSTS.labels' var='VARIABLE_NAME_LABELS'>

    <data:VARIABLE_NAME_LABELS.url.cssEscaped/>

  </b:loop>

</b:loop>

Posts les plus consultés de ce blog

ThéorieFonctionnalitésGestion
Populaire
ThéorieFonctionnalitésContenu
Populaire
ThéorieFonctionnalitésSEO
Populaire
DéveloppementsFichiers XML
Populaire