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

  I found "cook" two days ago. Played around with it for a day and then within a day got rid of two legacy applications in IBM Lotus Domino Notes and replaced them with "cook". It was really easy. A piece of cake. Actually it was even easier than cooking. Cooking involves more work than developing with "cook". What can I say about "cook"? Great application great price for what it delivers great forum with a lot of information and fast responses active and friendly community fast forward moving development cycle So what should I say "Monsieur Le Cook"? Keep the good work going it will lead to success. Having become a paying member in the words of Edith Piaf may I say ..... non rien de rien ... je ne regrette rien. Vive La France.
FK (JED)
         

Get Started