Forums

Mandigo custom page templates? (2 posts)

  1. shaws1777
    Member
    Posted 3 years ago #

    Hi,
    anyone have any experience with mandigo custom page templates? Here is the code of the page.php, what i want to do is take the sidebars off completely so that i have a page template with no sidebars...please help..

    <?php
    	global $mandigo_options, $dirs;
    
    	get_header();
    
    	// heading level for page title (h1, h2, div, ...)
    	$tag_post_title_single = $mandigo_options['heading_level_post_title_single'];
    ?>
    	<td id="content" class="<?php echo ($mandigo_options['sidebar_always_show'] ? 'narrow' : 'wide'); ?>column"<?php if (mandigo_sidebox_conditions($single = true)) { ?> rowspan="2"<?php } ?>>
    
    <?php
    	// if we have posts
    	if (have_posts()) {
    		// main loop
    		while (have_posts()) {
    			the_post();
    ?>
    
    		<div class="post" id="post-<?php the_ID(); ?>">
    <?php
    			// unless we disabled animations, display the buttons
    			if (!$mandigo_options['disable_animations']) {
    ?>
    				<span class="switch-post">
    					<a href="javascript:toggleSidebars();" class="switch-sidebars"><img src="<?php echo $dirs['www']['icons']; ?>bullet_sidebars_hide.png" alt="" class="png" /></a><a href="javascript:togglePost(<?php the_ID(); ?>);" id="switch-post-<?php the_ID(); ?>"><img src="<?php echo $dirs['www']['icons']; ?>bullet_toggle_minus.png" alt="" class="png" /></a>
    </div>
    				</span>
    
    <?php
    			}
    
    			// the post title
    ?>
    		<<?php echo $tag_post_title_single; ?> class="posttitle"><?php the_title(); ?></<?php echo $tag_post_title_single; ?>>
    			<div class="entry">
    <?php
    			// the content itself!
    			the_content(__('Read the rest of this entry', 'mandigo') .' &raquo;');
    
    			link_pages(
    				'<p><strong>'. __('Pages', 'mandigo') .':</strong> ',
    				'</p>',
    				'number'
    			);
    ?>
    				<div class="clear"></div>
    			</div>
    		</div>
    <?php
    			// the "edit page" link
    			edit_post_link(
    				__('Edit this entry.', 'mandigo'),
    				'',
    				''
    			);
    		}
    	}
    
    	// include the comments template
    	comments_template();
    ?>
    
    	</td>
    
    <?php
    	// if we have at least one sidebar to display
    	if ($mandigo_options['sidebar_always_show'] && $mandigo_options['sidebar_count']) {
    		if (mandigo_sidebox_conditions($single = true))
    			include (TEMPLATEPATH . '/sidebox.php');
    
    		include (TEMPLATEPATH . '/sidebar.php');
    
    		// if this is a 3-column layout
    		if ($mandigo_options['layout_width'] == 1024 && $mandigo_options['sidebar_count'] == 2)
    			include (TEMPLATEPATH . '/sidebar2.php');
    	}
    
    	get_footer();
    ?>
  2. drexnefex
    Member
    Posted 3 years ago #

    Here is code for a No Sidebar Page Template. this works for v1.32

    <?php
    /*
    Template Name: No Sidebar
    */
    ?>
    
    <?php
    	global $dirs;
    
    	get_header();
    
    	$tag_posttitle_single = get_option('mandigo_tag_posttitle_single');
    ?>
    	<td id="content" class="narrowcolumn">
    
    	<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    		<div class="post" id="post-<?php the_ID(); ?>">
    		<?php if (!get_option('mandigo_no_animations')): ?>
    			<span class="switch-post">
    				<a href="javascript:toggleSidebars();" class="switch-sidebars"><img src="<?php echo $dirs['www']['icons']; ?>bullet_sidebars_hide.png" alt="" class="png" /></a><a href="javascript:togglePost(<?php the_ID(); ?>);" id="switch-post-<?php the_ID(); ?>"><img src="<?php echo $dirs['www']['icons']; ?>bullet_toggle_minus.png" alt="" class="png" /></a>
    			</span>
    		<?php endif; ?>
    		<<?php echo $tag_posttitle_single; ?> class="posttitle"><?php the_title(); ?></<?php echo $tag_posttitle_single; ?>>
    			<div class="entry">
    				<?php the_content('<p class="serif">'. __('...Read the rest of this page','mandigo') .' &raquo;</p>'); ?>
    
    				<?php link_pages('<p><strong>'. __('Pages','mandigo') .':</strong> ', '</p>', 'number'); ?>
    
    			<div class="clear"></div>
    			</div>
    		</div>
    	<?php edit_post_link('<img src="'. $dirs['www']['scheme'] .'images/edit.gif" alt="" /> '. __('Edit this page','mandigo'), '<p>', '</p>'); ?>
    	<?php endwhile; endif; ?>
    
    	<?php comments_template(); ?>
    
    	</td>

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.