Yii Framework Forum: Gii Bootstrap Generator Breaks Two Column Layout - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Gii Bootstrap Generator Breaks Two Column Layout Rate Topic: -----

#1 User is offline   haymps 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 58
  • Joined: 11-June 12
  • Location:Wake Forest

Posted 20 February 2013 - 05:51 PM

Someone help please!

I am generating a new app using gii. I decided to use the Bootstrap Generator. I couldn't find any documentation on this (it says the same thing for it and for the CRUD generator).

I'm guessing it's TB bootstrap and it looks good, but the side menu bar ends up at the bottom of all the pages.

I haven't changed any files. I don't know that the css layout world yet. It happens on chrome and IE.

God bless you for your helping.
0

#2 User is offline   Hesam 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 66
  • Joined: 12-November 12
  • Location:Toronto

Posted 21 February 2013 - 12:30 AM

View Posthaymps, on 20 February 2013 - 05:51 PM, said:

Someone help please!

I am generating a new app using gii. I decided to use the Bootstrap Generator. I couldn't find any documentation on this (it says the same thing for it and for the CRUD generator).

I'm guessing it's TB bootstrap and it looks good, but the side menu bar ends up at the bottom of all the pages.

I haven't changed any files. I don't know that the css layout world yet. It happens on chrome and IE.

God bless you for your helping.


Yes, the extension has some bugs. I believe I saw it too. If I'm not mistaken, the menu section is loaded in view/layout/column2.php. Be careful which view folder you're looking at, because you may use the theme folder not the protected one. Anyway, go to the file, and replace the position of the lines of code responsible for side menu, with the line of code responsible for showing content. This solved my problem.
0

#3 User is offline   haymps 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 58
  • Joined: 11-June 12
  • Location:Wake Forest

Posted 21 February 2013 - 11:29 AM

View PostHesam, on 21 February 2013 - 12:30 AM, said:

Yes, the extension has some bugs. I believe I saw it too. If I'm not mistaken, the menu section is loaded in view/layout/column2.php. Be careful which view folder you're looking at, because you may use the theme folder not the protected one. Anyway, go to the file, and replace the position of the lines of code responsible for side menu, with the line of code responsible for showing content. This solved my problem.

Thanks for your help! I am new to this formatting. Which file do you mean when you say "go to the file"?
0

#4 User is offline   Hesam 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 66
  • Joined: 12-November 12
  • Location:Toronto

Posted 21 February 2013 - 11:34 AM

the
/www/appfolder/theme/bootstrapview/layout/column2.php.
. That's how I solved it. Mine looks like this:

<?php /* @var $this Controller */ ?>
<?php $this->beginContent('//layouts/main'); ?>
<div class="row">
   <div class="span9">
        	<?php echo $content; ?>
	</div>
	<div class="span3">
    	<?php
        	$this->beginWidget('zii.widgets.CPortlet', array(
            	'title'=>Yii::t('layout','Operations'),
        	));
        	$this->widget('bootstrap.widgets.TbMenu', array(
            	'items'=>$this->menu,
				'htmlOptions'=>array('class'=>'operations'),
        	));
        	$this->endWidget();
    	?>
 	
	</div>
 	
</div>
<?php $this->endContent(); ?>


you may change yours and try, the div class span3 is for the menu, and div class span9 is for the content.

View Posthaymps, on 21 February 2013 - 11:29 AM, said:

Thanks for your help! I am new to this formatting. Which file do you mean when you say "go to the file"?

1

#5 User is offline   haymps 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 58
  • Joined: 11-June 12
  • Location:Wake Forest

Posted 21 February 2013 - 12:01 PM

View PostHesam, on 21 February 2013 - 11:34 AM, said:

the
/www/appfolder/theme/bootstrapview/layout/column2.php.
. That's how I solved it. Mine looks like this:

<?php /* @var $this Controller */ ?>
<?php $this->beginContent('//layouts/main'); ?>
<div class="row">
   <div class="span9">
        	<?php echo $content; ?>
	</div>
	<div class="span3">
    	<?php
        	$this->beginWidget('zii.widgets.CPortlet', array(
            	'title'=>Yii::t('layout','Operations'),
        	));
        	$this->widget('bootstrap.widgets.TbMenu', array(
            	'items'=>$this->menu,
				'htmlOptions'=>array('class'=>'operations'),
        	));
        	$this->endWidget();
    	?>
 	
	</div>
 	
</div>
<?php $this->endContent(); ?>


you may change yours and try, the div class span3 is for the menu, and div class span9 is for the content.


wow! that did it. That world is a mystery to me and I need to learn it. You're a life saver, Hesam! Thank you!
0

#6 User is offline   outrage 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 312
  • Joined: 10-November 09
  • Location:Blackpool, United Kingdom

Posted 21 February 2013 - 07:24 PM

Just ensure that you always use the Bootstrap generator after your fix.
The standard Yii generator will output it's own "row" class that is used with Blueprint css, messing up your sweet ui.
0

#7 User is offline   haymps 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 58
  • Joined: 11-June 12
  • Location:Wake Forest

Posted 19 March 2013 - 04:22 PM

View Postoutrage, on 21 February 2013 - 07:24 PM, said:

Just ensure that you always use the Bootstrap generator after your fix.
The standard Yii generator will output it's own "row" class that is used with Blueprint css, messing up your sweet ui.


I just saw your post. I tried to understand it, but I'm not able. I ran bootstap generator to build the framework, and I don't use it anymore (except possibly for new tables). So I'm not sure what you mean here.

I appreciate you thoughts on this!
0

#8 User is offline   jacmoe 

  • Elite Member
  • Yii
  • Group: Moderators
  • Posts: 2,601
  • Joined: 10-October 10
  • Location:Denmark

Posted 19 March 2013 - 04:32 PM

/* moved from General Discussion */
"Less noise - more signal"
0

#9 User is offline   jacmoe 

  • Elite Member
  • Yii
  • Group: Moderators
  • Posts: 2,601
  • Joined: 10-October 10
  • Location:Denmark

Posted 21 March 2013 - 04:01 PM

Just FYI: I moved this topic to the 'Extensions' forum because it's related to Extensions, not because the Original Poster did something wrong. ;)
"Less noise - more signal"
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users