Hi, currently I am working on a solution to add automatically related content from our website (not only related blog posts) into a related content carousel. At this moment this module works with selecting following functionality:
related blog posts (dynamically) or
recent blog posts (dynamically) and not required
related pages (manually, like pillar pages, white papers, event pages)
At this point I started thinking about adding related pages also dynamically by keywords/tags as it works on the blog. My first idea was to use the meta-keyword functionality, wich is not the best solution for non-developers, but might work. So I started to fill the additional head html under advanced website settings with the meta key
This way I could access the keywords in my modules. But I feel like this is a bit dirty and I asked myself if it would be possible to insert the unused JSON-branches like content.keywords, content.meta_keywords, ... I found in the developer infos, which are empty or null. I would also appreciate a suggestion to make the keywords-input easier for content editors - even if we could input the keywords by adding them into a module. Any ideas are welcome!
<script>$('head').append( '<meta name="keywords" content="{% for item in module.keyword %}{ item }}{% endfor %}">' );</script>
now your content editors could easily add a keyword per repeater function... BUT... there are a few small steps left.
First: you'll have to seperate each keyword from another. you can do this by adding a "comma" after the item
<script>$('head').append( '<meta name="keywords" content="{% for item in module.keyword %}{ item }},{% endfor %}">' );</script>
Second/Last: you'll have to put the module into the template. There are several ways to achieve this. If you're using the drag&drop template builder simply add it to the footer section of each template. If you're using html templates, copy the module snippet.
<script>$('head').append( '<meta name="keywords" content="{% for item in module.keyword %}{ item }}{% endfor %}">' );</script>
now your content editors could easily add a keyword per repeater function... BUT... there are a few small steps left.
First: you'll have to seperate each keyword from another. you can do this by adding a "comma" after the item
<script>$('head').append( '<meta name="keywords" content="{% for item in module.keyword %}{ item }},{% endfor %}">' );</script>
Second/Last: you'll have to put the module into the template. There are several ways to achieve this. If you're using the drag&drop template builder simply add it to the footer section of each template. If you're using html templates, copy the module snippet.