Jan 23, 2019 2:34 PM - edited Jan 23, 2019 2:36 PM
Hello!
I have a coded template for my blog listing page. On this page I'm including a 'Page header' module which I'm using on a various other pages. It contains a heading, description and an image, but I can't seem to find anywhere to edit the content of this module.
Is there a better way to achieve this without duplicating the code and hard coding the content?
Solved! Go to Solution.
Jan 25, 2019 3:20 PM
@MaximSiebert thank you for sending that over! That helped clear up your question on my end. So there isn't a front end editor for the listing page on a blog similar to how there is for a website page or a blog post. The listing page content is pulled from the code that you have on your template instead and needs to be edited primarily from your listing template.
With that being said, you should be able to set what you want to show in that module on the listing page through that custom module that you're adding on line 2 without having to change the module or duplicate your code efforts (but it would require coding in the content for the listing page).
You'd just set parameter in the module on line 2 that matches the fields that you have in the custom module. So for example say I wanted to set the "header text" and "description text". That would look something like this:
{% module "module_154826219847228" module_id="4635434" label="Page Header" header_text="Testing this out" description_text="hello there!"%}
The parameters I'm pulling from your custom module (see image):
Let me know if you have any questions about this!
Jan 24, 2019 1:36 PM
Hey, @MaximSiebert you could probably use if is listing view in your page header module. So basically say that you had a header tag in the module, you could set what you want to show on the listing page in the initial if statement and if it is not the listing page, you'd show what you normally had between the header tags. Example:
{% if is_listing_view %}
<h1>header text for listing view</h1>
{% else %}
<h1>code/text you already had set up in the module</h1>
{% endif %}
Jan 25, 2019 9:07 AM
Hey @JasonRosa, I'm using 2 templates for this blog. One for the index and one for the post page. The modules on the post page are editable through the blog post but the modules on the listing page aren't editable.
I thought using the same page for both listing and post, with the if statement you mentioned, would allow me to change the listing module content via the blog post but unfortunately the module doesn't show up in the module list.
My issue is that I can't edit the listing page module content, not that it shows up in the blog posts.
Thanks, hope you can help!
Jan 25, 2019 9:09 AM
Hey, @MaximSiebert could you send me over a link to the listing template so that I can take a closer look?
Jan 25, 2019 9:31 AM
For sure!
Design Tools Link:
https://app.hubspot.com/beta-design-manager/3275991/code/7214755830
Page Link:
https://blog.ada.support/integrations
Jan 25, 2019 3:20 PM
@MaximSiebert thank you for sending that over! That helped clear up your question on my end. So there isn't a front end editor for the listing page on a blog similar to how there is for a website page or a blog post. The listing page content is pulled from the code that you have on your template instead and needs to be edited primarily from your listing template.
With that being said, you should be able to set what you want to show in that module on the listing page through that custom module that you're adding on line 2 without having to change the module or duplicate your code efforts (but it would require coding in the content for the listing page).
You'd just set parameter in the module on line 2 that matches the fields that you have in the custom module. So for example say I wanted to set the "header text" and "description text". That would look something like this:
{% module "module_154826219847228" module_id="4635434" label="Page Header" header_text="Testing this out" description_text="hello there!"%}
The parameters I'm pulling from your custom module (see image):
Let me know if you have any questions about this!
Jan 25, 2019 3:45 PM
That will do the trick! Thanks so much @JasonRosa.