It is currently Sun Jul 05, 2009 7:18 pm (All times are UTC )

 




Post new topic Reply to topic  [ 33 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: 2 or 3 colum layout
Posted: Sat Oct 07, 2006 5:00 am 
User avatar
Joomla! Enthusiast
Joomla! Enthusiast
Offline

Joined: Wed Mar 22, 2006 7:32 pm
Posts: 105
Location: Boston, USA
I am trying to find a solution to allow a 2 or 3 colom layout

If right modules is enabled i want to display

Code:
<div id="extras"><jdoc:include type="modules" name="right" style="-3" /></div>
<div id="content">
      <jdoc:tmpl name="showComponent" varscope="document" type="condition" conditionvar="PARAM_SHOWCOMPONENT">
         <jdoc:sub condition="1">
            <jdoc:include type="component" />
         </jdoc:sub>
         <jdoc:sub condition="0">
             
         </jdoc:sub>
      </jdoc:tmpl><br />
<jdoc:include type="modules" name="breadcrumb" style="-3" />
</div>


if no right module is activated i want this to display

Code:
<div id="contentwide">
      <jdoc:tmpl name="showComponent" varscope="document" type="condition" conditionvar="PARAM_SHOWCOMPONENT">
         <jdoc:sub condition="1">
            <jdoc:include type="component" />
         </jdoc:sub>
         <jdoc:sub condition="0">
             
         </jdoc:sub>
      </jdoc:tmpl><br />
<jdoc:include type="modules" name="breadcrumb" style="-3" />
</div>

_________________
What language is your laughter
What language is your sadness
What language is your joy
~ Stay Human


Top
   
 
 Post subject: Re: 2 or 3 colum layout
Posted: Mon Oct 09, 2006 8:26 am 
User avatar
Joomla! Enthusiast
Joomla! Enthusiast
Offline

Joined: Wed Mar 22, 2006 7:32 pm
Posts: 105
Location: Boston, USA
I have tried using the following to test if right modules exist.. and can put the wanted content inside those paramaters. Howerever is there any way to test is jdoc:doesnotexist?  this problem is a major setback for me, and my ability to get three templates i have in progress finished.  Any ideas greatly appreciated




_________________
What language is your laughter
What language is your sadness
What language is your joy
~ Stay Human


Top
   
 
 Post subject: Re: 2 or 3 colum layout
Posted: Tue Oct 10, 2006 5:20 pm 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Mon Apr 10, 2006 8:52 am
Posts: 15
Head-e wrote:
I have tried using the following to test if right modules exist.. and can put the wanted content inside those paramaters. Howerever is there any way to test is jdoc:doesnotexist?  this problem is a major setback for me, and my ability to get three templates i have in progress finished.  Any ideas greatly appreciated






I am searching for the same solution since a couple of days...

nobody who can help us??? :(


Top
  E-mail  
 
 Post subject: Re: 2 or 3 colum layout
Posted: Thu Oct 12, 2006 11:58 pm 
User avatar
Joomla! Explorer
Joomla! Explorer
Offline

Joined: Sat Sep 03, 2005 10:22 pm
Posts: 297
Location: AL
This is a major setback indeed but surely something will happen. It's all part of the beta process. I am working with someone to find a solution.
If anyone else knows anything feel free to speak up :)

_________________
www.joomlashack.com/joomla-templates


Last edited by Casey Lee on Fri Oct 13, 2006 12:00 am, edited 1 time in total.

Top
   
 
 Post subject: Re: 2 or 3 colum layout
Posted: Fri Oct 13, 2006 1:50 am 
User avatar
Joomla! Enthusiast
Joomla! Enthusiast
Offline

Joined: Wed Mar 22, 2006 7:32 pm
Posts: 105
Location: Boston, USA
I have spoken to Johan, and Rhuk about this issue. They are very busy with the release of 1.5 today but I was told that when the storm surrounding 1.5 settles they will provide a solution.

I have six templates for 1.5b ready awaiting this fix. They are for 1.5.x only and do not require legacy mode!

_________________
What language is your laughter
What language is your sadness
What language is your joy
~ Stay Human


Top
   
 
 Post subject: Re: 2 or 3 colum layout
Posted: Sun Oct 15, 2006 1:00 pm 
User avatar
Joomla! Enthusiast
Joomla! Enthusiast
Offline

Joined: Wed Mar 22, 2006 7:32 pm
Posts: 105
Location: Boston, USA
{bump to the front}

if thats allowed? if not mod can delete this post, and i offer my appologies

_________________
What language is your laughter
What language is your sadness
What language is your joy
~ Stay Human


Top
   
 
 Post subject: Re: 2 or 3 colum layout
Posted: Mon Oct 16, 2006 6:42 pm 
Joomla! Guru
Joomla! Guru
Offline

Joined: Thu Aug 18, 2005 9:46 am
Posts: 823



It works, but it's hard to explain to other people.
But maybe it will help you to continue to finish your templates for the moment.

I'll hope the devteam comes up with a better solution than mine.

:) Bumping up is not nice  :)
Nevertheless I suffered from the same problem.
With trial and error and Rhuk's template I found some not neat solution.
These lines in his template:
Code:
   <jdoc:exists type="modules" condition="right">
         <td class="greyline"> </td>
         <td width="170">
               <jdoc:include type="modules" name="right" style="-2"/>
         </td>
   </jdoc:exists>

I replaced it with this
Quote:


Do something else, since no right column avail


 

Top
  E-mail  
 
 Post subject: Re: 2 or 3 colum layout
Posted: Thu Oct 19, 2006 12:08 am 
Joomla! Enthusiast
Joomla! Enthusiast
Offline

Joined: Fri Sep 16, 2005 7:05 pm
Posts: 148
Location: Gauteng
I also have them same problem

I have tried the following code, but it does not work either.

Code:
<jdoc:exists type="modules" condition="user7" >
         <?php $count++; ?>
      </jdoc:exists>


And then I use
Code:
<div id="countmod_<?php echo $count ?>">


But it always adds 1 even if the module position is not active

_________________
http://www.ubulwembu.com
Joomla Support and Services


Top
  E-mail  
 
 Post subject: Re: 2 or 3 colum layout
Posted: Sun Oct 22, 2006 3:42 pm 
User avatar
Joomla! Champion
Joomla! Champion
Offline

Joined: Fri Aug 12, 2005 12:47 am
Posts: 6429
Hi guys, thanks for the feedback and the patience. It's a busy time to moderate all the bugs reports we are getting on the forums.

It seems the new template system is lacking some flexibility, u guys are used to doing alot with the 1.0 system and 1.5 seems to take away part of those features. An easy fix would be to move away from the jdoc:exist and jdoc:empty modifiers and simply use a few simple php functions to do this. Someting like :

count('modules', 'right') (would return a number)
exists('modules', 'right and left') (would return true/false)
empty('modules, 'right') (would return true/false)

The advantage of this approach would be flexibility and speed, u would be able to do alot more in your templates, and the templates would render faster. The disadvantage is that u will need to know a few php functions, but i hardly consider that a real problem since 1.0 worked in the same way.

Before I continue I would like to hear your feedback. Thanks,

Johan

PS. The includes will still work in the same way, using the placeholders.

_________________
Johan Janssens - Joomla Co-Founder, Lead Developer of Joomla 1.5

http://www.nooku.org - multi-lingual content manager and rapid extension development framework for Joomla 1.5
http://www.joomlatools.eu - training, consulting and extension development


Top
   
 
 Post subject: Re: 2 or 3 colum layout
Posted: Mon Oct 23, 2006 1:38 pm 
Joomla! Guru
Joomla! Guru
Offline

Joined: Thu Aug 18, 2005 9:46 am
Posts: 823
I think you're right and we need to use PHP functions.


Top
  E-mail  
 
 Post subject: Re: 2 or 3 colum layout
Posted: Mon Oct 23, 2006 2:33 pm 
User avatar
Joomla! Champion
Joomla! Champion
Offline

Joined: Fri Aug 12, 2005 12:47 am
Posts: 6429
I'm working on something, will be in SVN tonight. More news to follow.

_________________
Johan Janssens - Joomla Co-Founder, Lead Developer of Joomla 1.5

http://www.nooku.org - multi-lingual content manager and rapid extension development framework for Joomla 1.5
http://www.joomlatools.eu - training, consulting and extension development


Top
   
 
 Post subject: Re: 2 or 3 colum layout
Posted: Mon Oct 23, 2006 8:35 pm 
User avatar
Joomla! Champion
Joomla! Champion
Offline

Joined: Fri Aug 12, 2005 12:47 am
Posts: 6429
Oke guys as promised I have reviewed my orginal implementation and made an extensive amount of changes to the site template handling. What has been changed :

1. patTemplate is no longer used to render the site templates.

This creates a nice speed increase of about 0.050 msec on my machine on a page load of +/- 0.4 sec. This means a 1/8 speed improvement.

2. and have been replaced by countModules function

This change creates alot more flexibility. The countModules function can be giving a condition made up out of module positions. For example :

- countModules('user1 and user2'), will return 1 if there are module(s) in user1 and user2 position
- countModules('user1 or user2'), will return1 if there are module(s) in user1 or user2 position
- countModules('user1 + user2'), will return the total amount of modules in user1 and user2 position

I believe this function will cover all your needs to create flexible templates that adpat themselves to published modules.

3. The template paremeters can be accessed using a bit of simple php code.

params->get('showComponent')) : ?>
   


4. Variables accessible through the template

$this->language, the language tag
$this->direction, the language direction
$this->template, the template name

$option, $mainframe, $Itemid are also accessible if needed.

5. How does the system render a site template ?

Site templates are rendered in two stages,

- first all PHP functions are executed and all variables are replaced by their values
- secondly the system searches for all the jdoc::include statements and replaces them with the output of the modules, component,...

I think these changes bring back the needed flexibility and as a bonus we get a decent speed increase. Power to the designers ;)

Have a look at the changes made and let me know your thoughts. In the coming weeks I will be doing a series of blog posts to outline all the changes in the template system.

Johan

_________________
Johan Janssens - Joomla Co-Founder, Lead Developer of Joomla 1.5

http://www.nooku.org - multi-lingual content manager and rapid extension development framework for Joomla 1.5
http://www.joomlatools.eu - training, consulting and extension development


Last edited by Jinx on Mon Oct 23, 2006 8:37 pm, edited 1 time in total.

Top
   
 
 Post subject: Re: 2 or 3 colum layout
Posted: Mon Oct 23, 2006 11:38 pm 
Joomla! Fledgling
Joomla! Fledgling
Offline

Joined: Sat Apr 08, 2006 8:55 pm
Posts: 0
Gr8t!  I hope these changes give back the flexibility - because 1.5 is incredible!  We've been working on it for several days straight now. 

I downloaded the latest SVN but couldn't figure out the changes you were referring to with countModules.  I know these are busy days for you, I appreciate you listening to our requests and implementing them.  Maybe when you have a minute you could better explain how to call the countModules function as well as the other $this-> functions you mentioned were now available.

Again, I am INCREDIBLY impressed with your openness to suggestions and your quick replies!  And the results speak for themselves - the best CMS available!

Thanks,
David


Top
  E-mail  
 
 Post subject: Re: 2 or 3 colum layout
Posted: Mon Oct 23, 2006 11:52 pm 
User avatar
Joomla! Champion
Joomla! Champion
Offline

Joined: Fri Aug 12, 2005 12:47 am
Posts: 6429
To use the original example (creating a two/three column layout) :

countModules('right') : ?>


     

     





     



*Note : the style attributes are using the proper correct namings, the numeric style names are only supported with legacy activated.

-3 = rounded
-2 = xhtml
-1 = raw (default)
0  = table

When no style is giving the system assumes a -1.

This should get u started, countModules can do alot more but i'll leave that for another time.

_________________
Johan Janssens - Joomla Co-Founder, Lead Developer of Joomla 1.5

http://www.nooku.org - multi-lingual content manager and rapid extension development framework for Joomla 1.5
http://www.joomlatools.eu - training, consulting and extension development


Last edited by Jinx on Mon Oct 23, 2006 11:57 pm, edited 1 time in total.

Top
   
 
 Post subject: Re: 2 or 3 colum layout
Posted: Tue Oct 24, 2006 1:31 am 
User avatar
Joomla! Enthusiast
Joomla! Enthusiast
Offline

Joined: Thu Aug 18, 2005 1:54 pm
Posts: 203
Location: NY&NJ USA
Hello All,

Well I have to say I’m not happy with the removing of the Pat template system
do to the power it has. I can see that it was not going to be easy for a lot of end users and dev’s a like.

The reason I'm not happy is I wrote and finshed a DW extension for the JTemplate / Pat template system
and was on the way to writing the docs for it.

The new code is easy enough to get but are there any more surprises in the core template system?

Also I haved one other question about Modules v.s Module.
In the first few alpha's of J 1.5 the breadcrumb module would only render if it was assigned
to the call of Module and was the only module assigned to a module position ie.. "pathway".
will it stay the same or will Modules be the call for all position calls?

That said guys you have done a huge job in cleaning the code base from the old ways and
have done a very nice job.

hats off :).

_________________
Brian Diaz
Media 65
Joomla template Kit
http://www.m65.net & http://www.123webkit.com


Top
  E-mail  
 
 Post subject: Re: 2 or 3 colum layout
Posted: Tue Oct 24, 2006 3:02 am 
User avatar
Joomla! Enthusiast
Joomla! Enthusiast
Offline

Joined: Wed Mar 22, 2006 7:32 pm
Posts: 105
Location: Boston, USA
jinx, i was getting parse errors from the code your provided... I altered it slightly to what you now see below.

Code:
<?php if($this->countModules('right')) { ?>
<div id="extras"><jdoc:include type="modules" name="right" style="rounded" /></div>
<div id="content">
       <jdoc:include type="component" /><br />
       <jdoc:include type="modules" name="breadcrumb" style="rounded" />
</div>
<?php } else { ?>
<div id="contentwide">
      <jdoc:include type="component" /><br />
       <jdoc:include type="modules" name="breadcrumb" style="rounded" />
</div>
<?php } ?>


I am now faced with this error message
Quote:
Fatal error: Call to undefined function: countmodules() in /public_html/templates/ts_andreas01/index.php on line 21

_________________
What language is your laughter
What language is your sadness
What language is your joy
~ Stay Human


Top
   
 
 Post subject: Re: 2 or 3 colum layout
Posted: Tue Oct 24, 2006 5:15 am 
User avatar
Joomla! Enthusiast
Joomla! Enthusiast
Offline

Joined: Thu Aug 18, 2005 1:54 pm
Posts: 203
Location: NY&NJ USA
I think I can fix your issue with the pat system.

But I would need a little more information on what you would like to do.

The first thing I see is that you have two pat template’s with the same name “showComponent”
Now the system will not know which one to workout.


param.ini which by defult has in it showComponent=1 for your first template called “showComponent”

Now you ask yourself how did this file get it’s name well from name=“showComponent”
And conditionvar="PARAM_SHOWCOMPONENT"

Now the second template has the same name and the same conditionvar="PARAM_SHOWCOMPONENT"
Now these files are conflicting.

Now you could just do this

1. leave the first tmpl name the same and the conditionvar
2. Name your other tmpl name=”brian” for the conditionvar="PARAM_BRIAN"
3. in the param.ini file you will see showComponent=1
now add BRIAN=1 below the other.

These can be control via the back-end or by editing the template

That’s how you do tmpl files in Joomla 1.5

But for some reason it’s overwrite “BRIAN=1 in “ini” file this is an issue
with a function that checks for the file an overwrote the file.
But this should work if fixed.


// Jdoc: exits examples





// single condition




// double condition




  // multiple condition



_________________
Brian Diaz
Media 65
Joomla template Kit
http://www.m65.net & http://www.123webkit.com


Top
  E-mail  
 
 Post subject: Re: 2 or 3 colum layout
Posted: Tue Oct 24, 2006 6:42 am 
User avatar
Joomla! Champion
Joomla! Champion
Offline

Joined: Fri Aug 12, 2005 12:47 am
Posts: 6429
@m65.net : that's unfortunate, however when we are in beta phase changes like this can happen to suits the needs of third party developers/designers. Note that the solution u provided doesn't solve the initial problem of this thread, it will also not work anymore due ot the changes I made in the site template rendering as outlined above.

@head-e : did u update your codebase directly from SVN ?

_________________
Johan Janssens - Joomla Co-Founder, Lead Developer of Joomla 1.5

http://www.nooku.org - multi-lingual content manager and rapid extension development framework for Joomla 1.5
http://www.joomlatools.eu - training, consulting and extension development


Top
   
 
 Post subject: Re: 2 or 3 colum layout
Posted: Tue Oct 24, 2006 12:24 pm 
User avatar
Joomla! Guru
Joomla! Guru
Online

Joined: Wed Aug 17, 2005 10:30 pm
Posts: 796
Location: Vienna, VA US
It's a moot point now, but I did find a way to test for 2 or 3 column layout using the old patTemplae-based approach.  Here is an example for Joomla! history books...

Code:
<?php
defined('_JEXEC') or die('Restricted access');
//  Start page load timer ...tick tock...
// $tstart = TBD;
//  -----------
?>
<jdoc:comment>
Version 1.5Beta -- llast updated on Monday, 23 October, 2006 14:22:542
Compatible with Joomla 1.5.x
If you do use this template, or a variation thereof, I'd appreciate an email with your URL so I can take a look at it...thanks
Email: admin@hrpr.com
URL:  http://www.hrpr.com
Copyright © 2006 - <?php echo date('Y'); ?>, hrpr.com, All Rights Reserved.
</jdoc:comment>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="{LANG_TAG}" lang="{LANG_TAG}" dir="{LANG_DIR}" >
<head>
<jdoc:include type="head" />

<!-- Main stylesheet -->
<link rel="stylesheet" type="text/css" href="templates/{TEMPLATE}/css/template_css.css" />

<!--
  script to display digital clock...Harry Reinhardt, 2003-12-14
  For original template, uses documents.forms[0], searchbox uses documents.forms[1]
  if you modify this template to load the searchbox before the clock, make sure you
  change the documents.forms[0] in the script to documents.forms[1]!!
-->
<script src="templates/{TEMPLATE}/scripts/digiclock.js" type="text/javascript"></script>
</head>
<body onload="start()" onunload="stop()" > <!-- onload/onunload starts/stops the digital clock -->
<div id="bigbox"> <!-- big box -->
<div id="pathbox">
  
<!-- the hrpr_dummy module position and the dummy module loaded here are used in conjunction with jdoc:exists to control -->
<!-- front page versus non-front page display layout - do not change this!  The Dummy module is loaded for every page except the front page. -->
<!-- So, logic is if (no active module in right module and active module in hrpr dummy position) then  { not on front page } -->

   <jdoc:include type="modules" name="breadcrumb" style="1" />
   <jdoc:include type="modules" name="hrpr_dummy" style="1" /> 
</div> <!-- end pathway box -->

<div id="topheader">
<div>
<!-- Replace this with your own banner -->
<img src="templates/{TEMPLATE}/images/hrbanner1.png"  class="logo"  alt="HR's Industrial Strength Portal"  />
</div>
<div id="searchpos">
<jdoc:include type="modules" name="hrpr_search" style="1" />
</div><!-- end searchpos -->
<div id="clockpos">
<form action="index.php" method="post">
<input type="text" name="display" size="8" class="clock" />
</form>
</div> <!-- end clockpos -->
<div id="sitepos">
<a href="<?php echo $mainframe->getCfg('live_site'); ?>/administrator/index.php" target="_blank" class="sitepos"><span style="color:#191970;font-weight:bold;font-size:x-small;">www.hrpr.com</span></a>
</div>
<div id="datepos">
<div class="date">
<?php  echo strftime('%A, %d %B %Y');?>
</div>
</div><!-- end datepos -->
</div> <!-- end topheader -->
<div id="top_hz_menubox">
   <jdoc:include type="modules" name="user1" style="-2" />
</div>
<jdoc:exists: type="modules" condition="top">
   <jdoc:include type="modules" name="top" style="-2" /> 
</jdoc:exists>
<div id="leftbox">   <!--left-->
   <jdoc:include type="modules" name="left" style="-2" />
   <jdoc:include type="modules" name="user3" style="-2" />
</div>   <!--left-->
<jdoc:exists: type="modules" condition="right"> <!-- do three-column front page style -->
<div id="rightbox">   <!--right-->
     <jdoc:include type="modules" name="right" style="-2" />
</div>
<!-- close rightbox -->
<div id="centerboxfp">   
</jdoc:exists>
<!-- if any modules in hrpr_dummy position are active, then it is not front page, use two-column layout -->
<jdoc:exists type="modules" condition="hrpr_dummy"><!-- not front page, do two-column style -->
   <div id="centerbox">
</jdoc:exists>
<jdoc:exists type="modules" condition="top">
<div id="topbox">   <!--top-->
<!--<jdoc:include type="modules" name="'top" style=" -2" />-->
</div>   <!-- close topbox -->
</jdoc:exists>
<div id="middlebox">   <!--middle-->
   <jdoc:include type="component" />
</div>   <!--close middlebox-->
<jdoc:exists type="modules" condition="bottom and advert1">
<div id="bottombox">   <!--bottom-->
   <jdoc:include type="modules" name="bottom" style="1" />
   <jdoc:include type="modules" name="advert1" style="-2" />                    
</div>   <!--close bottombox -->
</jdoc:exists>
</div>   <!--close centerboxfp or centerbox-->
<div align="center" id="footerbox">
<jdoc:exists type="modules" condition="banner">
<div align="center">
   <jdoc:include type="modules" name="banner" style="2" />
</div>
</jdoc:exists>
<div class="pagestats">
<!-- · Powered by <a  href="http://www.joomla.org" target="_blank">Joomla</a>, a CMS released under the GNU/GPL License · -->
<br/>
Original content and layout Copyright © 2003 - <?php echo date('Y'); ?>, hrpr.com, All Rights Reserved.
<br/>
<?php
//  Display page generation time...
//  ---------
//$tend = TBD;
//$totaltime = ($tend - $tstart);
//printf ("Page was generated in %f seconds", $totaltime);
<br/><br />
<a href="javascript: scroll(0,0)" class="topbutton">- Top -</a>
<br /><br />
</div><!-- close pagestats -->
</div> <!-- close footerbox-->
</div> <!-- close bigbox -->
<jdoc:exists type=modules" condition="user8">
<div id="bottom_hz_menubox">
      <jdoc:include type="modules" name="user8" style="-2" />
</div>
</jdoc:exists>      
</body>
</html>

_________________
If you need a helping hand, use the one at the end of your own arm.
www.hrpr.com


Top
   
 
 Post subject: Re: 2 or 3 colum layout
Posted: Tue Oct 24, 2006 1:06 pm 
User avatar
Joomla! Enthusiast
Joomla! Enthusiast
Offline

Joined: Thu Aug 18, 2005 1:54 pm
Posts: 203
Location: NY&NJ USA
Hi Johan,

Yes I updated via SVN but I always have a few older copies for reference.

You can hide a div easy via a jdoc:exists from what I can see.
But maybe I’m missing something here.

Also inside the Tmpl you could add jdoc exists even in
The sample template by Rhuk it shows an example of this.

Well I guess it’s a moot point.

I’ll rework my extension it’s the time spent studying the Pat template system.
Is this also going to happen to components as well?

_________________
Brian Diaz
Media 65
Joomla template Kit
http://www.m65.net & http://www.123webkit.com


Top
  E-mail  
 
 Post subject: Re: 2 or 3 colum layout
Posted: Tue Oct 24, 2006 3:56 pm 
User avatar
Joomla! Enthusiast
Joomla! Enthusiast
Offline

Joined: Wed Mar 22, 2006 7:32 pm
Posts: 105
Location: Boston, USA
Jinx wrote:
@head-e : did u update your codebase directly from SVN ?


I'm still a little green! I'll update the svn when i return from work.. Unlike most people here i dont work in the field, and dont have all my toys (tortise) at work

_________________
What language is your laughter
What language is your sadness
What language is your joy
~ Stay Human


Last edited by Head-e on Tue Oct 24, 2006 3:58 pm, edited 1 time in total.

Top
   
 
 Post subject: Re: 2 or 3 colum layout
Posted: Fri Oct 27, 2006 5:03 pm 
User avatar
Joomla! Explorer
Joomla! Explorer
Offline

Joined: Sat Sep 03, 2005 10:22 pm
Posts: 297
Location: AL
I am on the road right now but as soon as i return I can provide a 1.5 compat 3 col css template as an example if you want to pick it apart.

_________________
www.joomlashack.com/joomla-templates


Top
   
 
 Post subject: Re: 2 or 3 colum layout
Posted: Mon Oct 30, 2006 8:19 pm 
User avatar
Joomla! Enthusiast
Joomla! Enthusiast
Offline

Joined: Thu Aug 18, 2005 1:54 pm
Posts: 203
Location: NY&NJ USA
Hello all

This question is for Johan

Can more then one parameter be added to the param.ini file?
And if so can I add my own name to the get(‘Brian’) then add Brian = 1 to the param.ini?

//default
params->get('showComponent')) : ?>



params->get(‘Brian’)) : ?>


_________________
Brian Diaz
Media 65
Joomla template Kit
http://www.m65.net & http://www.123webkit.com


Top
  E-mail  
 
 Post subject: Re: 2 or 3 colum layout
Posted: Mon Oct 30, 2006 10:14 pm 
User avatar
Joomla! Champion
Joomla! Champion
Offline

Joined: Fri Aug 12, 2005 12:47 am
Posts: 6429
U can add as many parameters as u want :) In your case u can do :






Just add this below the other parameter.

_________________
Johan Janssens - Joomla Co-Founder, Lead Developer of Joomla 1.5

http://www.nooku.org - multi-lingual content manager and rapid extension development framework for Joomla 1.5
http://www.joomlatools.eu - training, consulting and extension development


Top
   
 
 Post subject: Re: 2 or 3 colum layout
Posted: Mon Oct 30, 2006 10:39 pm 
User avatar
Joomla! Enthusiast
Joomla! Enthusiast
Offline

Joined: Thu Aug 18, 2005 1:54 pm
Posts: 203
Location: NY&NJ USA
Thanks for the quick answer Johan.

So just add via XML file good to go great!

Cheers,
Brian

_________________
Brian Diaz
Media 65
Joomla template Kit
http://www.m65.net & http://www.123webkit.com


Top
  E-mail  
 
 Post subject: Re: 2 or 3 colum layout
Posted: Mon Oct 30, 2006 11:42 pm 
User avatar
Joomla! Enthusiast
Joomla! Enthusiast
Offline

Joined: Fri Mar 03, 2006 1:27 pm
Posts: 198
Location: Saint Etienne (France)
about templates' code changes :

If i understand correctly, the change in the snv version increase performances.

so if i resume :
Code:
{LANG_TAG} becomes <?php echo $this->language; ?>
{LANG_DIR} -->  <?php echo $this->direction; ?>
{TEMPLATE} --> <?php echo $this->template ?>

and you can call any personal parameters (configured in the admin) by
Code:
<?php if($this->params->get("parameter_name")) : ?>
<!-- some custom code -->
<?php endif; ?>


But this increase in the execution time is it as important as the loss of simplicity of the code. The use of code php at the same time as won't it lose the users?


For a new user, don't you find that “$this” is little speaking for a variable name?
something like “$template” is more comprehensive - that's a variable used in the template - isn't it ?

Nico.


Top
  E-mail  
 
 Post subject: Re: 2 or 3 colum layout
Posted: Tue Oct 31, 2006 12:13 am 
User avatar
Joomla! Champion
Joomla! Champion
Offline

Joined: Fri Aug 12, 2005 12:47 am
Posts: 6429
The problem is that the $this variable can't be changed.

_________________
Johan Janssens - Joomla Co-Founder, Lead Developer of Joomla 1.5

http://www.nooku.org - multi-lingual content manager and rapid extension development framework for Joomla 1.5
http://www.joomlatools.eu - training, consulting and extension development


Top
   
 
 Post subject: Re: 2 or 3 colum layout
Posted: Tue Oct 31, 2006 8:08 am 
User avatar
Joomla! Enthusiast
Joomla! Enthusiast
Offline

Joined: Fri Mar 03, 2006 1:27 pm
Posts: 198
Location: Saint Etienne (France)
Jinx wrote:
The problem is that the $this variable can't be changed.

ok thanks, we can do with it :P !

Does the variable $my can be used ? I don't test it yet.

Nico


Top
  E-mail  
 
 Post subject: Re: 2 or 3 colum layout
Posted: Fri Nov 03, 2006 7:48 pm 
User avatar
Joomla! Champion
Joomla! Champion
Offline

Joined: Fri Aug 12, 2005 12:47 am
Posts: 6429
Only with the legacy layer on, otherwise u need to use the JUser class. Why would u need it ?

_________________
Johan Janssens - Joomla Co-Founder, Lead Developer of Joomla 1.5

http://www.nooku.org - multi-lingual content manager and rapid extension development framework for Joomla 1.5
http://www.joomlatools.eu - training, consulting and extension development


Top
   
 
 Post subject: Re: 2 or 3 colum layout
Posted: Fri Nov 03, 2006 8:44 pm 
User avatar
Joomla! Enthusiast
Joomla! Enthusiast
Offline

Joined: Fri Mar 03, 2006 1:27 pm
Posts: 198
Location: Saint Etienne (France)
I work on a converter of templates 1.0.x in 1.5 ... for the fun.
it was therefore simply to know if I changed or not the call to this function.


Top
  E-mail  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 33 posts ]  Go to page 1, 2  Next

Quick reply

 



Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group