PDA

View Full Version : شرطی شدن موقعیت ها



tnacym
سه شنبه 18 تیر 1392, 12:31 عصر
سلام
من دارم با پی اچ پی روی بوت استرپ یه قالب می نویسم
حالا می خوام موقعیت هاش شرطی بشه
موقعیت ها ایناست
‎ box-1
‎ box-2
box-3
box-4
‎ box-5
‎ بعد
‎ box-3 span4
‎ هست
‎ باقیشون
span2
می خوام که مثلا اگه توی موقعیت
‎ box-2
‎ box-4
چیزی نبود
‎ اونوقت به موقعیت های دیگه اضافه بشه
کد هم این هست:
<div class="row-fluid">
<?php if($this->countModules('box-1')): ?>
<div class="span2">
<jdoc:include type="modules" name="box-1" style="html5" />
</div>
<?php endif; ?>
<?php if($this->countModules('box-2')): ?>
<div class="span2">
<jdoc:include type="modules" name="box-2" style="html5" />
</div>
<?php endif; ?>
<?php if($this->countModules('box-3')): ?>
<div class="span4">
<jdoc:include type="modules" name="box-3" style="html5" />
</div>
<?php endif; ?>
<?php if($this->countModules('box-4')): ?>
<div class="span2">
<jdoc:include type="modules" name="box-4" style="html5" />
</div>
<?php endif; ?>
<?php if($this->countModules('box-5')): ?>
<div class="span2">
<jdoc:include type="modules" name="box-5" style="html5" />
</div>
<?php endif; ?>
</div

Rain song
یک شنبه 23 تیر 1392, 12:46 عصر
سلامــ
چی به موقعیتهای دیگه اضافه بشه ؟
یعنی مثلا بشه box6 , اینجوری؟