Problems, need help? Have a tip or advice? Post it here.
4 posts Page 1 of 1
Hi, KK

Getting hands dirty again with <cms:db_persist/> tag.
Now, my code is the following:

Code: Select all
                        <cms:db_persist 
                        _auto_title="0" _invalidate_cache="1" _mode="create"
                        _masterpage="<cms:show SEO_TEMPLATE />"
                        k_page_title="<cms:show k_page_title />"
                        k_page_name="<cms:show k_page_name />_<cms:show k_page_id />"
                        k_nestedpage_parent_id="<cms:show PARENT_ID />"             
                        />

Can save that PARENT_ID to any field of that page but 'k_nestedpage_parent_id'.
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
I modified a bit the code in order to fetch nested_page context, but it didn't help either. I can set PARENT_ID to an editable (for example 'title'), but not to actual field k_nestedpage_parent_id.

Code: Select all
                        <cms:db_persist 
                        _auto_title="0" _invalidate_cache="1" _mode="create"
                        _masterpage="<cms:show SEO_TEMPLATE />"
                        k_page_title="<cms:show k_page_title />"
                        k_page_name="<cms:show k_page_name />_<cms:show k_page_id />"
                        k_nestedpage_parent_id="<cms:show PARENT_ID />"             
                        />
               
                        <cms:set CREATED_PAGE_NAME = "<cms:show k_page_name />_<cms:show k_page_id />" scope='global' />
                        <cms:set CREATED_PAGE_ID = "<cms:pages masterpage=SEO_TEMPLATE page_name=CREATED_PAGE_NAME show_future_entries='1' ids_only='1' />" scope='global' />
               
                        <cms:nested_pages masterpage=SEO_TEMPLATE page_name=CREATED_PAGE_NAME show_future_entries='1' >
<pre>
<cms:php>
global $CTX;
print_r($CTX); 
</cms:php>
</pre>

                                      <cms:db_persist
                                      _auto_title="0" _invalidate_cache="1" _mode="edit"
                                      _masterpage="<cms:show SEO_TEMPLATE />"
                                      _page_id="<cms:show CREATED_PAGE_ID />"
                                      title="<cms:show PARENT_ID />"             
                                      />
                        </cms:nested_pages>

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
Please try using 'k_nested_parent_id' as the field name instead.
Does it help?
Yup, it helps! Thank you very much :)
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
4 posts Page 1 of 1