Je bute sur une modification de template.
Dans le template
Par celui-ci
Voilà mon fichier
Mais aucune modification du template ne se fait et quand je clique sur test je constate que la modification n'est pas appliquée.
J'ai essayé aussi ça mais le résultat est le même :
Qu'est-ce que je fais mal ??
Dans le template
thread_view
je veux remplacer ce bout de code
HTML:
<xf:macro template="metadata_macros" name="metadata"
arg-description="{$fpSnippet}"
arg-shareUrl="{{ link('canonical:threads', $thread) }}"
arg-canonicalUrl="{{ link('canonical:threads', $thread, {'page': $page}) }}" />
HTML:
<xf:if is="$thread.cover_image">
<xf:macro template="metadata_macros" name="metadata"
arg-description="{$fpSnippet}"
arg-shareUrl="{{ link('canonical:threads', $thread) }}"
arg-canonicalUrl="{{ link('canonical:threads', $thread, {'page': $page}) }}"
arg-imageUrl="{$thread.cover_image}" />
<xf:else/>
<xf:macro template="metadata_macros" name="metadata"
arg-description="{$fpSnippet}"
arg-shareUrl="{{ link('canonical:threads', $thread) }}"
arg-canonicalUrl="{{ link('canonical:threads', $thread, {'page': $page}) }}" />
</xf:if>
Voilà mon fichier
template-modification.xml
XML:
<?xml version="1.0" encoding="utf-8"?>
<template_modifications>
<modification type="public" template="thread_view" modification_key="replace_html_code" description="Replace HTML code to set the OG image" execution_order="10" enabled="1" action="str_replace">
<find><![CDATA[<xf:macro template="metadata_macros" name="metadata"
arg-description="{$fpSnippet}"
arg-shareUrl="{{ link('canonical:threads', $thread) }}"
arg-canonicalUrl="{{ link('canonical:threads', $thread, {'page': $page}) }}" />]]></find>
<replace><![CDATA[<xf:if is="$thread.cover_image">
<xf:macro template="metadata_macros" name="metadata"
arg-description="{$fpSnippet}"
arg-shareUrl="{{ link('canonical:threads', $thread) }}"
arg-canonicalUrl="{{ link('canonical:threads', $thread, {'page': $page}) }}"
arg-imageUrl="{$thread.cover_image}" />
<xf:else/>
<xf:macro template="metadata_macros" name="metadata"
arg-description="{$fpSnippet}"
arg-shareUrl="{{ link('canonical:threads', $thread) }}"
arg-canonicalUrl="{{ link('canonical:threads', $thread, {'page': $page}) }}" />
</xf:if>]]></replace>
</modification>
</template_modifications>
J'ai essayé aussi ça mais le résultat est le même :
XML:
<?xml version="1.0" encoding="utf-8"?>
<template_modifications>
<modification type="public" template="thread_view" modification_key="replace_html_code" description="Replace HTML code to set the OG image" execution_order="10" enabled="1" action="str_replace">
<find><![CDATA[<xf:macro template="metadata_macros" name="metadata"
arg-description="{$fpSnippet}"
arg-shareUrl="{{ link('canonical:threads', $thread) }}"
arg-canonicalUrl="{{ link('canonical:threads', $thread, {'page': $page}) }}" />]]></find>
<replace><![CDATA[<xf:if is="$thread.cover_image">
<xf:macro template="metadata_macros" name="metadata"
arg-description="{$fpSnippet}"
arg-shareUrl="{{ link('canonical:threads', $thread) }}"
arg-canonicalUrl="{{ link('canonical:threads', $thread, {'page': $page}) }}"
arg-imageUrl="{$thread.cover_image}" />
<xf:else/>
$0
</xf:if>]]></replace>
</modification>
</template_modifications>
Qu'est-ce que je fais mal ??