Adding page to a section

Highlighted
Tourist
4 0 2

Hello,

I am using modular theme and i want to use content of a particular page on my product page. How can I add that page using HTML code

I get an option as a section of 'use HTML code" in the modular theme. Could anyone help me with the code to be added to set the desired page as a section.

Thanks

Vivek Agarwal

0 Likes
Highlighted

here is code :

use page shema code to use:

https://shopify.dev/docs/themes/settings#page

Shopify theme developer and customization

I Would like to add new functionality or customize an existing one, please hire me.
If helpful then please Like and Accept Solution .
Email: ashiquehussaincodediary@gmail.com

0 Likes
Highlighted
Shopify Partner
2294 116 341

How can I add that page using HTML code


@Vivek16 wrote:

How can I add that page using HTML code


Only HTML is not possible unless: a theme has an alternate template with {% layout none %} that also ONLY returns a pages content {{ page.content }} in which case a simple iframe html tag can be used to insert content. 
For a liquid-free method you will have to use javascript to fetch a pages json and insert it in the page.

 

Liquid use the global object - pages in your product template

For example if you are trying to get the content for a FAQ page (/pages/faq) to use on every product page

<div class="rte">{{pages.faq.content}}</div>

Or another example if you are trying to get the content for a shipping page policy (/policies/shipping) to use on every product page

 

<div class="rte">{{shop.shipping_policy.body}}</div>

 

Note: the CSS class rte (aka Rich Text Editor) is optional but useful in some themes to style page content properly. 

Problem Solved? ✔️Accept and ? Like the solution so you can help others.
Buy me a coffee ☕ paypal.me/paulnewton or donate to eff.org
Confused? Busy? Buy a custom solution paull.newton+shopifyforum@gmail.com
0 Likes