Forum for discussing general topics related to Couch.
8 posts Page 1 of 1
I have a new tag cms:config_list_view
Many want to change the date format but the code does not work:

Code: Select all
<cms:config_list_view orderby='weight' order='asc' limit='25' exclude='default-page' searchable='1' >
   
<cms:field 'k_selector_checkbox' />
<cms:field 'k_page_title' header='My Custom Name 1' />

<cms:field 'predstaviane' header='My Custom Name 2' class='custom_table' />

<cms:field  'k_page_date' format='%I:%M %p %d %B %Y' />

<cms:field 'k_actions' />
   
</cms:config_list_view>


Please help me do it :)

Regards
Please try to make sure date format is working in <cms:date format='..' />. This is because of localized format and it should be supported by server. Please let me know if you made it work outside.
Join COUCH:TALK channel here https://t.me/couchcms_chat
Ryazania — a framework to boost productivity with Add-ons viewtopic.php?f=2&t=13475
Support my efforts to help the community https://boosty.to/trendo/donate
trendoman,
I tried to apply it but it does not work :|
something else must change
orbital wrote: trendoman,
I tried to apply it but it does not work :|
something else must change


If it doesn't work, then please enable support of your locale in server. For example, I have <cms:date /> in north european locale for a client and it doesn't work on my local stack. Simply outputs nothing. And when I upload code to server with correct locale, it works. So, maybe check with server php config?
Join COUCH:TALK channel here https://t.me/couchcms_chat
Ryazania — a framework to boost productivity with Add-ons viewtopic.php?f=2&t=13475
Support my efforts to help the community https://boosty.to/trendo/donate
My website is uploaded to the server and not on the local server :?
Please contact you host to enable support of locale. If it is enabled (can be tested with the same <cms:date> on previous Couch), then I run out of suggestions so far.

Important: please check if you instructed cms:date to use your locale.
http://docs.couchcms.com/tags-reference/date.html
<cms:date format='%I:%M %p %d %B %Y' locale='your-locale' />
Join COUCH:TALK channel here https://t.me/couchcms_chat
Ryazania — a framework to boost productivity with Add-ons viewtopic.php?f=2&t=13475
Support my efforts to help the community https://boosty.to/trendo/donate
Hi,

The problem is in the way @orbital is trying to use the cms:field tag -
<cms:config_list_view orderby='weight' order='asc' limit='25' exclude='default-page' searchable='1' >

<cms:field 'k_selector_checkbox' />
<cms:field 'k_page_title' header='My Custom Name 1' />

<cms:field 'predstaviane' header='My Custom Name 2' class='custom_table' />

<cms:field 'k_page_date' format='%I:%M %p %d %B %Y' />

<cms:field 'k_actions' />

</cms:config_list_view>

As the docs stated, if you wish to output your own content then use the cms:field as a tag-pair instead of as a self-closing tag.

The correct way would be -
Code: Select all
<cms:field 'k_page_date' >
    <cms:date k_page_date format='jS M, Y' />
</cms:field>

You can now tweak the 'format' and 'locale' as you desire.

Hope it helps.
Loooooolllll My God - this work - thank you very much :D :D
8 posts Page 1 of 1