Skip to content

Commit

Permalink
Merge pull request #3 from Magenerds/feature/opengraph
Browse files Browse the repository at this point in the history
Fixed Systemconfig for OpenGraph
  • Loading branch information
steinkopffp authored Jun 26, 2018
2 parents b713699 + 4478cd6 commit dbd09af
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 12 deletions.
15 changes: 6 additions & 9 deletions etc/adminhtml/system.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,6 @@
<label>Transfer Shop Logo</label>
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
</field>
<field id="facebook_enable" translate="label" type="select" sortOrder="30" showInDefault="1" showInWebsite="1"
showInStore="1">
<label>Enable Facebook OpenGraph</label>
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
</field>
<field id="facebook_app_id" translate="label" type="text" sortOrder="40" showInDefault="1" showInWebsite="1"
showInStore="1">
<label>Facebook App ID</label>
</field>
</group>
<group id="product_properties" translate="label" type="text" sortOrder="20" showInDefault="1"
showInWebsite="1" showInStore="1">
Expand Down Expand Up @@ -85,6 +76,12 @@
</group>
<group id="open_graph" translate="label" type="text" sortOrder="20" showInDefault="1"
showInWebsite="1" showInStore="1">
<label>Facebook Open Graph</label>
<field id="facebook_enable" translate="label" type="select" sortOrder="30" showInDefault="1" showInWebsite="1"
showInStore="1">
<label>Enable Facebook OpenGraph</label>
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
</field>
<field id="facebook_app_id" translate="label" type="text" sortOrder="40" showInDefault="1" showInWebsite="1"
showInStore="1">
<label>Facebook App ID</label>
Expand Down
2 changes: 1 addition & 1 deletion view/frontend/layout/catalog_category_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceBlock name="head.additional">
<block ifconfig="richsnippet/general/facebook_enable" class="Magenerds\RichSnippet\Block\Facebookopengraph" name="magenerds.facebookopengraph" template="Magenerds_RichSnippet::facebookopengraph_head.phtml" />
<block ifconfig="richsnippet/open_graph/facebook_enable" class="Magenerds\RichSnippet\Block\Facebookopengraph" name="magenerds.facebookopengraph" template="Magenerds_RichSnippet::facebookopengraph_head.phtml" />
</referenceBlock>
</body>
</page>
2 changes: 1 addition & 1 deletion view/frontend/layout/catalog_product_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<body>
<referenceBlock name="head.additional">
<block ifconfig="richsnippet/general/enable" class="Magenerds\RichSnippet\Block\Schemaorg" name="magenerds.schemaorg" template="Magenerds_RichSnippet::meta_head.phtml" />
<block ifconfig="richsnippet/general/facebook_enable" class="Magenerds\RichSnippet\Block\Facebookopengraph" name="magenerds.facebookopengraph" template="Magenerds_RichSnippet::facebookopengraph_head.phtml" />
<block ifconfig="richsnippet/open_graph/facebook_enable" class="Magenerds\RichSnippet\Block\Facebookopengraph" name="magenerds.facebookopengraph" template="Magenerds_RichSnippet::facebookopengraph_head.phtml" />
</referenceBlock>
</body>
</page>
2 changes: 1 addition & 1 deletion view/frontend/layout/cms_page_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceBlock name="head.additional">
<block ifconfig="richsnippet/general/facebook_enable" class="Magenerds\RichSnippet\Block\Facebookopengraph" name="magenerds.facebookopengraph" template="Magenerds_RichSnippet::facebookopengraph_head.phtml" />
<block ifconfig="richsnippet/open_graph/facebook_enable" class="Magenerds\RichSnippet\Block\Facebookopengraph" name="magenerds.facebookopengraph" template="Magenerds_RichSnippet::facebookopengraph_head.phtml" />
</referenceBlock>
</body>
</page>

0 comments on commit dbd09af

Please sign in to comment.