For each category in my Jekyll site, I have a static page with a record of all changes that have happened regarding that category.
For instance, a network change log, a lighting change log, a building and facilities change log, etc.
I could simply create a new post in the appropriate category and write about the change, but that's more of a detailed account.
I would rather keep a running journal in a page format. So here's the question:
If I create an XML feed that finds only a single page, ie:
{% for page in site.pages %}
{% if page.title == 'Network Change Log' %}
do this xml feed stuff
{% endif %}
{% endfor %}
Then I'll get a single entry in my feed for that page, and the only thing that will change will be the first part of the body of the content and the site.time.
If the feed is formatted correctly, will the automatic e-mail engines like Mailchimp consider each revision or each change to the page as a "new post" like a post feed would, thereby triggering an e-mail update as though there was a new post?
The goal is to monitor the feed and trigger automated updates for that single page any time it is updated.
Thanks in advance!
Related
Hey I have the following problem:
In Shopify, I have sent my colours per product on the Collection Page as a separate product (at least that's what it looks like).
This all fits, however, instead of the product name under the image on the collection page, the first variant is now displayed, e.g. Black XS instead of the hoodie name.
I used the following code in my snippet.
{{ product.title }}
I need to somehow be able to render the product name here.
Thanks a lot
I made a custom themed D8 site which is working great. I've made some custom content types so the people at my company can post jobs and internships.
These types have their own node twig files to make them custom where I add the fields in my custom layouts.
I made several contact forms with their own fields and email to send it to. My content editors can choose which form to add to the job page. The form is a referenced field to Contact Form and I output it as a Rendered Identity. --> My twig file can output it as {{ content.field_contact_formulier }}
So it all works great, except for the fact that when I try to submit the form, it just doesn't work.
At the moment I just implemented the good old mailto: links but I do want my form to work.
Any tips on this strange issue? Thanks in advance!
I'm using Shopify as my eCommerce platform. My customer has some products that are related to each other. But don't think of a typical related products system, basically these products have parts, and those individual parts can be reordered separate from the product itself.
The client wants to list all the parts for a given product on the product page. The parts are each cataloged as an individual product themselves. The parts have a "part" tag to identify them as a part, and they have a "part:handle" tag to identify which product they are associated with.
On the product page I attempted to do something like this:
{% for product in collection.products %}
product
{% endfor %}
I know this code will not do what I'm ultimately trying to do, but I tried it just to see if I could access collection data on the product page. It doesn't work. But it does work on the COLLECTION page. Is there any way to access collection data while on the product page? Do I need to use the Shopify API for this? Can anyone provide an example? Thanks!
You can use the global collections object to access collection info from any page.
Here's an example from the Shopify documentation that iterates over products in the "frontpage" collection:
{% for product in collections.frontpage.products %}
{{ product.title }}
{% endfor %}
The liquid object collections contains a list of all of the collections in a shop.
Just a simple question on Kentico: Is it possible to exclude some pages from rendering the CMS breadcrumbs?
Specifically, our users want the homepage not to render any breadcrumbs so I'm trying to exclude that.
This is kinda tricky. But if you ensure that breadcrumb control has no data you can hide it via 'Hide if no record found' settings.
Set WHERE condition of the Breadcrumb web part to the following macro:
{% if(CurrentDocument.NodeAliasPath == "/Homepage"){"1=0"}else{"1=1"} #%}
Obviously, you have to use node alias path of your homepage.
Set 'Hide if no record found' to true.
I have a User entity and all users have many Category entities. I have a controller which accepts a Category slug as a parameter.
I would like to render a menu that lists all of the Category's of a User as links to that controller. I would also like to mark one as "current" if they are on that page already.
The KnpMenuBundle looks nice for this https://github.com/KnpLabs/KnpMenuBundle/blob/master/Resources/doc/index.md
But all of its examples use a static menu that is built up, rather than building the menu from dynamic items. I thought about getting the items in the Builder, but I already have them in the controller that ultimately renders the twig template, so I would rather somehow pass these Category's to the Builder and let it handle rendering a menu.
What is the best way to do this?
My other idea is to just do the menu myself in twig, but I would need extra logic to determine which page is "current"
I know that this might not be useful to you anymore but for others viewing the question maby this is helpful.
Since recently it is possible to send your own variables from twig to the builder.
It's done like this as noted in the Documentation:
{% set menuItem = knp_menu_get('AcmeDemoBundle:Builder:mainMenu', [], {
'some_option': 'my_value'
})
%}
{{ knp_menu_render(menuItem) }}