What I wanted to do, was use one page template for as much as possible, without having numerous similar templates lying around. However, on my change settings page for FEU, I did not want to have search capabiliteis. Similarly, on my 'forgot password' page, I did not want to have the login stuff showing up. Here's what I did to work around the problem.
a) When editing a page, under the options tab (CMS 1.0.5) is a metadata field, where you can entere various meta tags,
etc, etc. On my change settings page, I added a few strings like:
Code: Select all
{assign var='hidefeu' value='1'}
{assign var='hidesearch' value='1'}
{assign var='privatepage' value='1'}
c) In my page template, I could then use smarty logic to control wether certain parts of my template were displayed. In the example below, I can hide the call to the FrontEndUsers module. As well, I can hide the search form, if the user is not logged in or the search form is not useful on specific pages.
Additionally, I can hide page content, if the page is marked as private and theuser is not loggedin. However, if the page is not marked as private, then the content is displayed.
For example:
Code: Select all
{if !isset($hidefeu)}
<div class="login">{cms_module module='FrontEndUsers' nocaptcha='1'}</div><!-- end of feu -->
{/if}
{if $customcontent_loggedin > 0 && !isset($hidesearch)}
<div class="search">{search}</div><!-- end of search -->
{/if}
<!-- Start Content Area -->
<div id="main">
{if isset($privatepage)}
{if $customcontent_loggedin > 0}
{content}
{else}
<div class="bigerror">Private Content. Authorization Required</div>
{/if}
{else}
{content}
{/if}
FYI: The example here (for the private content) used the FrontEndUsers and CustomContent modules.