Could anyone assist me in rearranging the block/content regions within the Danland theme. Specifically, I would like to move from:

Left Sidebar | Main Content Area | Right Sidebar

to:

Main Content Area | Left Sidebar | Right Sidebar

or, better:

Main Content Area | First Sidebar | Second Sidebar

Comments

jervine’s picture

On a side note - I am very new to Drupal and have been lurking around the Danland issue queue and Drupal forums to find answers to most of my questions, however, this is beyond me.

danpros’s picture

Hi,

Of couse that is possible. Look at page-front.tpl.php and page.tpl.php:

<div id="wrapper">
<?php if ($left): ?>
			<div id="sidebar-left" class="sidebar">
				<?php print $left ?>
			</div>
		<?php endif; ?>
<div id="content">
			<?php if ($content_top) : ?><div class="content-top"><?php print $content_top; ?></div>
			<?php endif; ?>
			<?php if (!$is_front) print $breadcrumb; ?>
			<?php if ($show_messages) { print $messages; }; ?>
			<?php if ($tabs) : ?><div class="tabs"><?php print $tabs; ?></div><?php endif; ?>
			<?php if ($title) : ?><h1 class="title"><?php print $title; ?></h1><?php endif; ?>
			<?php print $help; ?>
		      <?php if ($content) : ?><div class="content-middle"><?php print $content; ?></div>
			<?php endif; ?>
			<?php if ($content_bottom) : ?><div class="content-bottom"><?php print $content_bottom; ?></div>
			<?php endif; ?>

</div> <!-- end content -->

<?php if ($right): ?>
			<div id="sidebar-right" class="sidebar">
				<?php print $right; ?>
			</div>
		<?php endif; ?>
<div style="clear:both"></div>
</div> <!-- end wrapper -->

You can re-order the left sidebar with the content to this:

<div id="wrapper">
<div id="content">
			<?php if ($content_top) : ?><div class="content-top"><?php print $content_top; ?></div>
			<?php endif; ?>
			<?php if (!$is_front) print $breadcrumb; ?>
			<?php if ($show_messages) { print $messages; }; ?>
			<?php if ($tabs) : ?><div class="tabs"><?php print $tabs; ?></div><?php endif; ?>
			<?php if ($title) : ?><h1 class="title"><?php print $title; ?></h1><?php endif; ?>
			<?php print $help; ?>
		      <?php if ($content) : ?><div class="content-middle"><?php print $content; ?></div>
			<?php endif; ?>
			<?php if ($content_bottom) : ?><div class="content-bottom"><?php print $content_bottom; ?></div>
			<?php endif; ?>

</div> <!-- end content -->

<?php if ($left): ?>
			<div id="sidebar-left" class="sidebar">
				<?php print $left ?>
			</div>
		<?php endif; ?>

<?php if ($right): ?>
			<div id="sidebar-right" class="sidebar">
				<?php print $right; ?>
			</div>
		<?php endif; ?>
<div style="clear:both"></div>
</div> <!-- end wrapper -->

The rest is CSS.

Dan

danpros’s picture

Status: Active » Closed (fixed)

Answered.

Dan

jervine’s picture

Thank you very much

Anonymous’s picture

I need to know how exactly to modify the front page file to change banner size. I do not know anything about php so I could not use the suggestion in the user manual. I broke it all the time. Pleas give me an exact replacement for what is in the default file. Many thanks.

Leeteq’s picture

Title: Rearranging block/content regions within Danland » GUI option to shift sidebars and content regions in Danland
Version: 6.x-2.0 » 7.x-1.0
Category: Support request » Feature request
Issue summary: View changes
Status: Closed (fixed) » Active

It would be great if we could have a settings option to decide where to place (especially the "left") sidebars. Now in these mobile-first/responsive times, we very often want the content aread to be rendered first, then the "first sidebar", and if space enough, the second sidebar, and if not enough space, shift one or both sidebars down below the content.

Theme basess like AdaptiveThemes provides this for themes like Pixture Reloaded and Mix_and_match.

I hope this can be accomplished with this great theme as well.
Not being (totally) mobile friendly reduces the usefulness and potential of this theme significantly.
It used to be my favorite choice.

Leeteq’s picture

Issue summary: View changes

Hmm, and I _think_ the OP meant his example to have Left/RIght in the natural order.
(These perspectives, however, begs renaming the sidebars to "first and second" instead of left/right.)

Leeteq’s picture

Version: 7.x-1.0 » 7.x-1.x-dev
danpros’s picture

@Leeteq you can help converting the Drupal 8 version as well. We already have the beta release now.

firedude’s picture

I have installed Danland on my drupal 7 install, but for some reason the left sidebar is not showing. Can anyone give me any advise as to how to correct this prob? Thanks

firedude’s picture

I am having trouble getting my left sidebar to show on a danland theme installed on d7. Can anyone please advise me how to get this to work?