Problems, need help? Have a tip or advice? Post it here.
8 posts Page 1 of 1
hi,

I was wondering how to create editable sections for meta tags in coach? I could not find any tutorials here so far.
Hi,

We have two options -
1. Use a separate template to hold 'global' values for all other templates. This method is used in the tutorial (https://docs.couchcms.com/tutorials/por ... bal-values)

2. Define each template's global values with that template itself - please see '2. Template globals' in
viewtopic.php?f=5&t=11105

Hope it helps.
thanks! @

One more question. I have an issue with the blog images. In the HTMl template my header images works according to the CSS, but when looking up my site /blog.php the images most have the same size, as in the tutorial template (150/650)

Even when I add a class tag to the image it gets just bigger but keeps the same dimensions

in blog.php

there is

<cms: editable name= 'blog_image'
crop='1'
width=''
height=''

type='image'

/>


I can put any number or delete height and width completly, the images where I put :src="<cms:show blog_image />" alt=""/>
Still are stretched to the size 150/650

am I missing something out?
The 'height' and 'width' values of <cms:editable> (if set) come into action when a new image is selected in the input and the page is saved - at this point Couch physically tries to resize the image to the specified dimensions.

The dev tools of your browser should inform you about the 'actual' (physical) dimensions of an image (as opposed to the dimensions used to display the image). If those dimensions match the ones you set with <cms:editable> (as they should), Couch is working as expected.

You'll need to check your CSS to find out then as to why the image is not being displayed as you are expecting.
EDIT:

ok now it worked. In the blog posts it now shows the right dimensions. Just two things are not correct. The images is duplicated (once in the header as hero image and once in the content section. And the resolution is really bad.

Any idea why?

here is the example:

https://www.explike.com/blog.php?p=3
Often quality parameter makes images worse, because by default it is set to 90 (means that images are resaved on upload). Have you set it to 100 already?
ok now it worked.

I mean with global values I get it but I just want have simple editable meta tags for "title" and "description" for each blog post.

This for example does not work
<meta name="description" content="<cms:show meta_desc/> />
dimon93 wrote: I just want have simple editable meta tags for "title" and "description" for each blog post.

It should be straightforward.. Define an editable and use it in page-view. If something doesn't work, attach a zipped template and I'll fix it for you.
8 posts Page 1 of 1