Problems, need help? Have a tip or advice? Post it here.
2 posts Page 1 of 1
Hello
I would like to create the k_page_name automatically based on the k_page_id in the template using
Code: Select all
<cms:config_form_view>
   <cms:persist
      k_page_name=k_page_id
   />
</cms:config_form_view>

But it gives me -1 instead of the newly generated id.

Later on I would like to create a Shortcode calculated from other variables but also depending on the k_page_id, e.g.:
Code: Select all
<cms:config_form_view>
   <cms:persist
      k_page_name="<cms:if k_page_name!=''><cms:show k_page_name /><cms:else/><cms:date format='s' /><cms:show k_page_id /><cms:date format='m' /></cms:if>"
   />
</cms:config_form_view>

How could I do this?
ID is assigned at the moment when page is inserted into database. Couch does not assign ID - it is provided by database as autoincrement from last known id.

I understand your situation and advise to use CustomRoute in this template. Save desired URL in a field and find requested page by content in such field.
2 posts Page 1 of 1