Problems, need help? Have a tip or advice? Post it here.
6 posts Page 1 of 1
Hi,
im trying to display more data on event calendar list from docs.
I want to display background color attached to li element.
But <cms:show tag-name/> is blank.

When I put this tag on event detailed view (not in calendar tag) all is correct.

My question is how can I read editable regions inside calendar tag?
That editable is, probably, not availabe inside your code, because of scope.
Try to create a new variable and assign desired value to it, which will be available for any code on page.
<cms:set new_variable = tag_name scope='global' />

The tag set above puts known value of tag_name to our new_variable and defines global scope.

Since that, you can use your global variables inside any tags like cms:pages, cms:calendar, cms:folders etc, which operate in their own scope.

Let me know if any doubts.
PS Please post real piece of code next time. It will be easier to help and see your situation clearly. :)
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, that method doesn't work for now.

my base tag name is:
Code: Select all
<cms:template title='Events' clonable='1'>
<cms:editable name='background_color' label='Event background' type='text' />
</cms:template>


After template I assigned new var using this:
Code: Select all
<cms:set background_color_global = background_color scope='global' />

And I wanted to display it here
Code: Select all
<cms:entries limit='2' skip_custom_fields='1'>
<li style="background-color: <cms:show background_color_global />">
<a href="<cms:show k_page_link />"><cms:show k_page_title /></a>
</li>
</cms:entries>


Dump don't list my new tag.

What is wrong?
Thanks for posting the code. Set skip_custom_fields to '0'. More details here: http://docs.couchcms.com/tags-reference/entries.html ;)

There shouldn't be a need to re-set editable as global anymore, because entries fetches pages from the same template. So, please test it and let us know.
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, still nothing changed.
I can't display background_color_global on this view at all
Well, I can take a look at it first hand. Attach a zip here with template or send ftp creds in PM.
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
6 posts Page 1 of 1