I want to create a custom module like blog listing but instead extract the dynamic content from a blog, I want to extract dynamic content from a static page.
is it possible?
THX
I want to create a custom module like blog listing but instead extract the dynamic content from a blog, I want to extract dynamic content from a static page.
is it possible?
THX
Hello @JVallejo7
Do you mean this?
You also have the option of adding a page field to add fields
Best regards,
Özcan
Hello @JVallejo7
okay cool.
Then, try something like this as an example
{% set my_content = content_by_id(module.page_field) %}
<p>{{my_content.title}}</p>
Best regards
Özcan
That’s ok, but can I get some extra content like the first h1 of this page ?
{% set my_content = content_by_id(module.page_field) %}
<p>{{my_content.firstH1}}</p>
Thank
Sure, but now comes some tricky part.
You can use some predefined HubSpot variables.
And, if you want to see additional information what these variables can output, you have to use pprint.
Example:
{% set my_content = content_by_id(module.page_field) %}
<p>{{my_content|pprint}}</p>
This will print you a json object, with keys and values. Each key/value pair is separated by a comma.
I hope this can help you
Best regards,
Özcan
THANK YOU SO MUCH
Is there another type of pprint that shows JSON pretty to testing ?
Thanks
Thanks. Oezcan understands me. Sorry, my English is a little bit poor