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.068 seconds

Awards for the best Joomla app. This product is gonna win an award for this amazing job. Cook Self Service is the the best application from all over the Joomla universe ! It brings Joomla to a professional level really advanced for developers. It is a real fun to develop with it. The ACL part and security checks implementation are just... so much hours saved. I can now concentrate myself more on the design part and the creative works. Thank you so much. Guys I offer you all my congratulation ! Keep up the works because Joomla is needing it to increase the quality of extensions availables on the JED. I also learned a lot because I can see how to code at the proper place and I found all my answers reading the forum.
lack_hanson (JED)
          

Get Started