I've enabled extended folders via this very handy guide (https://www.couchcms.com/docs/extended- ... /post2.htm), and have a working template file (industries.php) that functions for both page content and the folder views (eg. /industry/government/ and /industries/business/).
I've used the extended folders function to create a special folder template (industries-folder.php) to set some category level or "folder" level editable regions which should be displayed on the folder level view.
One of these regions is a landing page link which is a page outside the couch system. I'd like this URL to appear in links on both the folder view, and in a snippet, based on the folder the page is in.
I've defined the editable region in industries-folder.php like this:
Here's how I'm using get_custom_field to place the link in the folder view as a simple custom 'breadcrumb' back to the landing page:
And here's how I'm using it in the HTML snippet to display a category based message and URL in the page view:
Here's the problem:
The URL I've set in the folder for content_page_link never appears. BUT, the text field content_page_button render just fine, exactly as I've written in the folder settings, and k_folder_title shows just fine in the folder view.
From the documentation, it seems I need to be defining the specific page generated by the Folder manager from the industries-folder.php template, the problem is, I don't know what "k_" variable I need to use to render the correct page.
None of the k_page... tags have worked, and I've hit the wall.
The default slugs for the generated industries-folder pages are generic like folder-9, and it doesn't appear to like it when I change the slugs.
So, am I on the right track here? Any advice appreciated
I've used the extended folders function to create a special folder template (industries-folder.php) to set some category level or "folder" level editable regions which should be displayed on the folder level view.
One of these regions is a landing page link which is a page outside the couch system. I'd like this URL to appear in links on both the folder view, and in a snippet, based on the folder the page is in.
I've defined the editable region in industries-folder.php like this:
- Code: Select all
<cms:editable name='content_page_link' label='Content page Button URL' desc='URL for industry landing page' type='text' group='content_page' order='3' />
Here's how I'm using get_custom_field to place the link in the folder view as a simple custom 'breadcrumb' back to the landing page:
- Code: Select all
<h3><a href="<cms:get_custom_field 'content_page_link' masterpage='industries-folder.php' />"><cms:show k_folder_title /></a></h3>
And here's how I'm using it in the HTML snippet to display a category based message and URL in the page view:
- Code: Select all
<a href="<cms:get_custom_field 'content_page_link' masterpage='industries-folder.php' />"><cms:get_custom_field 'content_page_button' masterpage='industries-folder.php' /></a>
Here's the problem:
The URL I've set in the folder for content_page_link never appears. BUT, the text field content_page_button render just fine, exactly as I've written in the folder settings, and k_folder_title shows just fine in the folder view.
From the documentation, it seems I need to be defining the specific page generated by the Folder manager from the industries-folder.php template, the problem is, I don't know what "k_" variable I need to use to render the correct page.
None of the k_page... tags have worked, and I've hit the wall.
The default slugs for the generated industries-folder pages are generic like folder-9, and it doesn't appear to like it when I change the slugs.
So, am I on the right track here? Any advice appreciated
