Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xhtml output : support for linkable embeds #85

Merged
merged 2 commits into from
Oct 26, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,33 @@
<xsl:if test="@id">
<xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
</xsl:if>
<xsl:value-of select="text()" disable-output-escaping="yes"/>
<xsl:choose>
<xsl:when test="@url">
<a>
<xsl:attribute name="href">
<xsl:value-of select="@url"/>
</xsl:attribute>
<xsl:attribute name="target">
<xsl:choose>
<xsl:when test="@ezlegacytmp-embed-link-target">
<xsl:value-of select="@ezlegacytmp-embed-link-target"/>
</xsl:when>
<xsl:otherwise>_self</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<xsl:if test="@xhtml:ezlegacytmp-embed-link-title">
<xsl:attribute name="title">
<xsl:value-of select="@xhtml:ezlegacytmp-embed-link-title"/>
</xsl:attribute>
</xsl:if>
<xsl:copy-of select="@class"/>
<xsl:value-of select="text()" disable-output-escaping="yes"/>
</a>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="text()" disable-output-escaping="yes"/>
</xsl:otherwise>
</xsl:choose>
</div>
</xsl:template>

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<section
xmlns:image="http://ez.no/namespaces/ezpublish3/image/"
xmlns:xhtml="http://ez.no/namespaces/ezpublish3/xhtml/"
xmlns:custom="http://ez.no/namespaces/ezpublish3/custom/">
<!-- Note, this is not plain ezxmltext. This is output after Converter\EzLinkToHtml5 and Converter\EmbedToHtml5 has processed it-->
<paragraph>kake </paragraph>
<embed view="embed" size="medium" object_id="126" custom:offset="0" custom:limit="5" ezlegacytmp-embed-link-title="custom title" ezlegacytmp-embed-link-id="customID" ezlegacytmp-embed-link-url="http://ez.no" url="http://ez.no">
<![CDATA[

<!-- START ezpublish-kernel/eZ/Bundle/EzPublishCoreBundle/Resources/views/default/content/embed_image.html.twig (EzPublishCoreBundle:default:content/embed_image.html.twig) -->
<figure class="ezimage-field">
<img src="http://localhost/var/ezdemo_site/storage/images/_aliases/medium/media/images/ez/775-1-eng-GB/ez.gif" alt="my alt text" height="67 " width="200 " />
</figure>
<!-- STOP ezpublish-kernel/eZ/Bundle/EzPublishCoreBundle/Resources/views/default/content/embed_image.html.twig (EzPublishCoreBundle:default:content/embed_image.html.twig) -->
]]>
</embed>
</section>
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<section xmlns="http://ez.no/namespaces/ezpublish5/xhtml5">
<p>kake </p>
<div>
<a href="http://ez.no" target="_self">
<figure class="ezimage-field">
<img alt="my alt text" height="67 " src="http://localhost/var/ezdemo_site/storage/images/_aliases/medium/media/images/ez/775-1-eng-GB/ez.gif" width="200 "/>
</figure>
</a>
</div>
</section>