Problems, need help? Have a tip or advice? Post it here.
6 posts Page 1 of 1
Is it possible to turn of the page view for cloned pages? So that I can list them (entirely or partially on other pages) but they don't have their own page each?

The reason I wouldn't use repeatable regions is because I would like to use relationships for other information.
If you don't want to use any views of a clonable template - that is you only want to use the data on other pages of the site - you can make the template non-executable. This will cause the page to return a 404 - page not found if you try to access the template or it's pages directly.
Code: Select all
<cms:template title='my_template' clonable='1' executable='0' >

An alternative would be to just create the template as usual, but not use the page-view in any way. The pages will be there, but no one will be the wiser because you won't link to them or let on in any way (for instance through a sitemap) that they exist. If for some reason someone does access the page through a browser, it will be blank or show the list view, depending on how you code the template.

The code below would explicitly show a blank page for anything but the list view.
Code: Select all
<cms:if k_is_list>
   ...Code for the list view...
<cms:else/>
</cms:if>
isn't there a way I could "fake" a 404 (somehow through the template or maybe the .htaccess or something?) it would be nice if the header are correct, I don't like loose ends like empty pages etc...
isn't there a way I could "fake" a 404
Please try this -
Code: Select all
<cms:if k_is_page>
    <cms:abort is_404='1' />
</cms:if>
for clonable templates that I use only as templates for listing data on other pages I put in a redirect to the most appropriate page - so the client never clicks on 'view' only to see a disconcerting blank page.

Until recently I was simply putting in :
Code: Select all
<?php require_once( 'admin/cms.php' ); ?>
<cms:template title='add reviews' clonable='1' executable='0' commentable='0' order='47' >
   ...
</cms:template>
<cms:redirect url="<cms:link 'reviews.php' />" />
<?php COUCH::invoke(); ?>


But that could get annoying during developing the site - since I would have to remove the redirect if I was changing the template and needing to refresh - and I would forget to put it back.

Now instead of the basic <cms:redirect> I have a snippet embedded :
Code: Select all
<cms:embed 'redirect_to_diary.html' />


THe snippet:
Code: Select all
<cms:if k_user_access_level lt '10' >
    <cms:redirect url="<cms:link 'diary.php' />" />
</cms:if>
Thank you all for the very helpful answers!
6 posts Page 1 of 1