Since shopify backend doesn’t support setting search engine optimization keywords for pages, I want to add keywords for pages through code.
Now I have a problem, I don’t know the name of the template that corresponds to the product page, about us page. It’s where the red line is in the image.
So far I have made sure that the index and blog are correct. So, how should I know the template name for other pages (e.g. product listing page, FAQ page, contact us page)?
Looking forward to the expert’s answer, thanks.
你可以试试template.name
Can you tell us how that works exactly?
中文交流嘛,template就是一个对象,取它里面的name这个key就可以拿到每个模板的名字
哈哈好滴,我还以为是自动翻译成中文了。你说的很对,关键是怎么取name的这个值?直接在代码里面输出template.name,然后在源代码里面去看输出结果吗? 可否麻烦写个代码看下?
具体怎么修改

