Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC:

default.php view 30 Nov 2013 17:50 #11716

a little cleaning tip:

the following code is just an example.

JCOOK generated code:
	<?php if ($compat == '3.0'): ?>
	<div class="row-fluid">
		<div id="contents" class="span12">
			<div>

				<!-- BRICK : multilanguage -->
				<?php echo $this->loadTemplate('multilanguage'); ?>
			</div>
			<div>

				<!-- BRICK : options -->
				<?php echo $this->loadTemplate('options'); ?>
			</div>
			<div>

				<!-- BRICK : events -->
				<?php echo $this->loadTemplate('events'); ?>
			</div>
		</div>
	</div>
	<?php elseif ($compat == '1.6'): ?>
	<div>
		<div>

			<!-- BRICK : multilanguage -->
			<?php echo $this->loadTemplate('multilanguage'); ?>
		</div>
		<div>

			<!-- BRICK : options -->
			<?php echo $this->loadTemplate('options'); ?>
		</div>
		<div>

			<!-- BRICK : events -->
			<?php echo $this->loadTemplate('events'); ?>
		</div>
	</div>
	<?php endif; ?>


I would write it:
	<?php if ($compat == '3.0'): ?>
	<div class="row-fluid">
		<div id="contents" class="span12">		
	<?php elseif ($compat == '1.6'): ?>
	<div>
		<div>		
	<?php endif; ?>
			<div>

				<!-- BRICK : multilanguage -->
				<?php echo $this->loadTemplate('multilanguage'); ?>
			</div>
			<div>

				<!-- BRICK : options -->
				<?php echo $this->loadTemplate('options'); ?>
			</div>
			<div>

				<!-- BRICK : events -->
				<?php echo $this->loadTemplate('events'); ?>
			</div>
		</div>
	</div>

Please Log in or Create an account to join the conversation.

default.php view 30 Nov 2013 18:40 #11717

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
Yeah, thanks, I am gonna rewrite all this soon.
Making it easier.

I was trying to follow Joomla standards from all version crossed along the way, but at the end I think I am gonna suppress the left menu defnitivly, because it is a pain.

It has been introduced since J!3.0, but seems already past over (If I understood well, since 3.2)
Make it easier for all versions a plain page rendering the same in back and front.

Only the toolbar will be the particular case.
The menu should be abstracted (as Cook does), and displayable as wishes in a defined areas, even handle multiple menus, different renderings, etc...
Being automatic is super cool, but this should be handled by the component (not by default)
So, the component can generate automaticaly the same, but in a better way so it is not a pain for cross-versions components.

Then the filters part will be placed at the top with a nice automated rendering.
Coding is now a piece of cake

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Time to create page: 0.056 seconds

Real time saver and great Component Builder tool ! I have been developing with J-Cook Pro Component Builder for several months now and can say with all honesty that this product/service is second to none. The product is feature rich and is being improved and added to all the time. Do yourself a favor if you need to build a Joomla! Component then you can do no wrong in trying the product. You will save on time and effort while being able to deliver your project on time. J-Cook pro does the hard work for you you then have the freedom to fully customise the end result for your own needs. 

One word: Awesome.
Edwardcox (JED)
         

Get Started