Page 1 of 1

Trying to modify the Brander template

Posted: Mon Feb 07, 2011 2:14 am
by mflacche
Hello: I have been working on my website... http://www.flacche.com

I used the Brander template. I really like the look. My problem is... I would like to create a secondary template for all of my other pages BEYOND the main page... WITHOUT the slide show. When I try to delete the code for the slide show, the remainder of my page justifies LEFT without staying centered.

Can anyone help me with this? Also, once I create a template without the slide show... I need to learn how to apply it to all other pages beyond my main page.

Thank you in advance for any help!

Matt
[email protected]

Re: Trying to modify the Brander template

Posted: Mon Feb 07, 2011 8:55 am
by ranwilli
It appears it's just the "gallery" div that would need to be suppressed...

And you could alter the template to display it just on the home page.

Re: Trying to modify the Brander template

Posted: Mon Feb 07, 2011 11:37 am
by mflacche
I have been tinkering with a copy of my template. When I delete the Gallery Div, the rest of my content on the page (below the gallery) justifies LEFT instead of center.

Is there a way you could help me modify the template, then give me an idea of how to apply it to all of my secondary pages?

Could I call you at some point? Or could you call me?

Thanks!

Matt
ranwilli wrote:It appears it's just the "gallery" div that would need to be suppressed...

And you could alter the template to display it just on the home page.

Re: Trying to modify the Brander template

Posted: Wed Feb 09, 2011 12:00 pm
by mflacche
My site is fixed now... THANK YOU RANDY!
mflacche wrote:I have been tinkering with a copy of my template. When I delete the Gallery Div, the rest of my content on the page (below the gallery) justifies LEFT instead of center.

Is there a way you could help me modify the template, then give me an idea of how to apply it to all of my secondary pages?

Could I call you at some point? Or could you call me?

Thanks!

Matt
ranwilli wrote:It appears it's just the "gallery" div that would need to be suppressed...

And you could alter the template to display it just on the home page.

Re: Trying to modify the Brander template

Posted: Tue Feb 15, 2011 4:22 pm
by trb
Hi.
I have this same problem with slider in brander template.
I want to show it only on frontpage.
Can u help me to solve this problem too?
THX.

Re: Trying to modify the Brander template

Posted: Tue Feb 15, 2011 5:02 pm
by mflacche
Contact Randy at Harpervance.com
trb wrote:Hi.
I have this same problem with slider in brander template.
I want to show it only on frontpage.
Can u help me to solve this problem too?
THX.

Re: Trying to modify the Brander template

Posted: Wed Jun 15, 2011 6:04 pm
by ranwilli
What we did was to enclose the entire "gallery div"
within this "if clause":

Code: Select all

<?php
$menu = & JSite::getMenu();
if ($menu->getActive() == $menu->getDefault()) {
	<div id="gallery">blahblahblah</div>
NOTE:There is an inline script following the div which should be within the if clause as well.
}
?>
This tests to see if the page being viewed is the Home page, and if it is, displays the "gallery" div. If not, then it just blows right past it and displays whatever comes next.

Lifted straight from:

http://docs.joomla.org/How_to_determine ... front_page

Re: Trying to modify the Brander template

Posted: Fri Jul 15, 2011 7:20 pm
by koslar

Code: Select all

<body>

    <div class="pagewidth">

	 <div id="sitename">

                <a href="index.php"><img src="templates/<?php echo $this->template ?>/images/logo.png" width="226" height="106" alt="logotype" /></a>

        </div>

		    <div id="menu">

			    <div id="navigation">

                    <?php TopMenu($menu_name); ?> 

                </div>

	        </div>

			     <div id="gallery"><div id="tittleslide"><h3><?php echo $tittle ?></h3></div>


			        <div id="faded">

                        <ul>

                            <li><img src="templates/<?php echo $this->template ?>/images/slide11.jpg" alt="" /></li>

                            <li><img src="templates/<?php echo $this->template ?>/images/slide22.jpg" alt="" /></li>

                            <li><img src="templates/<?php echo $this->template ?>/images/slide33.jpg" alt="" /></li>

                            <li><img src="templates/<?php echo $this->template ?>/images/slide44.jpg" alt="" /></li>

							<li><img src="templates/<?php echo $this->template ?>/images/slide55.jpg" alt="" /></li>

						</ul>

                             

                    </div>

	            </div>

				    <script type="text/javascript">

                         var $j = jQuery.noConflict(); 

                             $j(function(){

                             $j("#faded").faded({

						            speed:<?php echo $speed ?>,// 900,

						            crossfade: true,

						            autopagination: false,

						            autoplay: <?php echo $autoplay ?>,//default 5000,

						            autorestart: true

				             });

                         });

	                </script>
This is a part of the body code in the brander template...I try to enclose this to the if clause like writen above but it doesn't work...Could someone please fix this part of code for me and enclose the div gallery in this if clause?It would be very kind of you!

Re: Trying to modify the Brander template

Posted: Sun Oct 23, 2011 6:25 pm
by jazzarek
hello there,


is there another way to remove that slide show from the other pages apart from Home?
could anyone help there please??

or maybe it#s possible to remove that slide show completely and add new extension there like phoca gallery etc.

thanks,

arek

Re: Trying to modify the Brander template

Posted: Sun Oct 23, 2011 6:32 pm
by ranwilli
Replace:

Code: Select all

<div id="gallery"><div id="tittleslide"><h3><?php echo $tittle ?></h3></div>


			        <div id="faded">

                        <ul>

                            <li><img src="templates/<?php echo $this->template ?>/images/slide11.jpg" alt="" /></li>

                            <li><img src="templates/<?php echo $this->template ?>/images/slide22.jpg" alt="" /></li>

                            <li><img src="templates/<?php echo $this->template ?>/images/slide33.jpg" alt="" /></li>

                            <li><img src="templates/<?php echo $this->template ?>/images/slide44.jpg" alt="" /></li>

							<li><img src="templates/<?php echo $this->template ?>/images/slide55.jpg" alt="" /></li>

						</ul>

                             

                    </div>

	            </div>

				    <script type="text/javascript">

                         var $j = jQuery.noConflict(); 

                             $j(function(){

                             $j("#faded").faded({

						            speed:<?php echo $speed ?>,// 900,

						            crossfade: true,

						            autopagination: false,

						            autoplay: <?php echo $autoplay ?>,//default 5000,

						            autorestart: true

				             });

                         });

	                </script>
with:

Code: Select all

<?php
$menu = & JSite::getMenu();
if ($menu->getActive() == $menu->getDefault()) {
<div id="gallery"><div id="tittleslide"><h3><?php echo $tittle ?></h3></div>


			        <div id="faded">

                        <ul>

                            <li><img src="templates/<?php echo $this->template ?>/images/slide11.jpg" alt="" /></li>

                            <li><img src="templates/<?php echo $this->template ?>/images/slide22.jpg" alt="" /></li>

                            <li><img src="templates/<?php echo $this->template ?>/images/slide33.jpg" alt="" /></li>

                            <li><img src="templates/<?php echo $this->template ?>/images/slide44.jpg" alt="" /></li>

							<li><img src="templates/<?php echo $this->template ?>/images/slide55.jpg" alt="" /></li>

						</ul>

                             

                    </div>

	            </div>

				    <script type="text/javascript">

                         var $j = jQuery.noConflict(); 

                             $j(function(){

                             $j("#faded").faded({

						            speed:<?php echo $speed ?>,// 900,

						            crossfade: true,

						            autopagination: false,

						            autoplay: <?php echo $autoplay ?>,//default 5000,

						            autorestart: true

				             });

                         });

	                </script>
}
?>
It's really just that simple...

Re: Trying to modify the Brander template

Posted: Sun Oct 23, 2011 6:40 pm
by jazzarek
thanks it's simple :)

but in that case i need two templates that would run that website.
one which is only for the main menu and a second one for the rest.

how to do that ?

please :)

arek

Re: Trying to modify the Brander template

Posted: Mon Oct 24, 2011 2:59 pm
by jazzarek
hello there,

so i've past that point. i've menage to suppress that slide show somehow,
by deleting some of its components in the Edit main page template section
but now, the articles remain in the same position. they don't move up.

btw, i've got two templates based on the brander assigned to my website.
one which has the slide show at home section and the other template which i wanted to use
to display articles only.

would it be better just to delete the whole slide show and add a module position in that place and assign some other gallery extension to it?

help

thanks

Re: Trying to modify the Brander template

Posted: Thu Jan 26, 2012 4:42 pm
by bimmerguy
ranwilli, I have replaced the code you posted but I get an error:

Parse error: syntax error, unexpected '<' in ... /templates/brander/index.php on line 88

Any idea? I've done this a few times and I still can't see what's wrong.

Code: Select all

<?php

// SUCKERFISH   // 
$menu_name = $this->params->get("menuName", "mainmenu");

// no direct access
defined('_JEXEC') or die('Restricted access');

?>

<!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" lang="<?php echo _LANGUAGE; ?>" xml:lang="<?php echo _LANGUAGE; ?>">

<head>
<?php 
define( 'TEMPLATEPATH', dirname(__FILE__) );
include( TEMPLATEPATH.DS."suckerfish.php");
?>

<?php JHTML::_('behavior.mootools'); ?>

	<jdoc:include type="head" />
	<?php if($my->id) initEditor(); ?>
	<meta http-equiv="Content-Type" content="text/html; <?php echo _ISO; ?>" />

<link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/system/css/system.css" type="text/css" />
<link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/system/css/general.css" type="text/css" />
<link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/brander/css/tdefaut.css" type="text/css" media="all" />
<script type="text/javascript" src="templates/<?php echo $this->template ?>/js/scroll.js"></script>
<script type="text/javascript" src="templates/<?php echo $this->template ?>/js/script.js"></script>
<script type="text/javascript" src="templates/<?php echo $this->template ?>/js/mouseover.js"></script>
<script type="text/javascript" src="templates/<?php echo $this->template ?>/js/cufon-yui.js"></script>
<script type="text/javascript" src="templates/<?php echo $this->template ?>/js/cufon-replace.js"></script>
<script type="text/javascript" src="templates/<?php echo $this->template ?>/js/Tw_Cen_MT_Condensed_Extra_Bold_400.font.js"></script>
<link rel="icon" type="image/gif" href="<?php echo $this->baseurl; ?>/templates/<?php echo $this->template; ?>/favicon.gif" />
<script type="text/javascript" src="templates/<?php echo $this->template ?>/js/jquery.js"></script>
<script type="text/javascript" src="templates/<?php echo $this->template ?>/js/faded.js"></script>

<!--[if IE 7]>
<link href="templates/<?php echo $this->template ?>/css/ie7.css" rel="stylesheet" type="text/css" />
<![endif]-->

<?php //setting slide fading

$tittle = $this->params->get("tittle", "my latest work");
$speed= $this->params->get("speed", "900");
$autoplay= $this->params->get("autoplay", "5000");

?>

<?php   //main width
$mod_left = $this->countModules( 'left' );
$mod_right = $this->countModules( 'right' );
if ( $mod_left && $mod_right ) {
 
	$width = '';
} elseif ( ($mod_left || $mod_right) ) {
 
	$width = '';
} else {
  
	$width = '-full';
}
?>

</head>
<body>
    <div class="pagewidth">
	 <div id="sitename">
                <a href="index.php"><img src="templates/<?php echo $this->template ?>/images/logo.png" width="226" height="106" alt="logotype" /></a>
        </div>
		    <div id="menu">
			    <div id="navigation">
                    <?php TopMenu($menu_name); ?> 
                </div>
	        </div>
						<?php
							$menu = & JSite::getMenu();
							if ($menu->getActive() == $menu->getDefault()) {
							<div id="gallery"><div id="tittleslide"><h3><?php echo $tittle ?></h3></div>


                 <div id="faded">

                        <ul>

                            <li><img src="templates/<?php echo $this->template ?>/images/slide11.jpg" alt="" /></li>

                            <li><img src="templates/<?php echo $this->template ?>/images/slide22.jpg" alt="" /></li>

                            <li><img src="templates/<?php echo $this->template ?>/images/slide33.jpg" alt="" /></li>

                            <li><img src="templates/<?php echo $this->template ?>/images/slide44.jpg" alt="" /></li>

                     <li><img src="templates/<?php echo $this->template ?>/images/slide55.jpg" alt="" /></li>

                  </ul>

                             

                    </div>

               </div>

                <script type="text/javascript">

                         var $j = jQuery.noConflict();

                             $j(function(){

                             $j("#faded").faded({

                              speed:<?php echo $speed ?>,// 900,

                              crossfade: true,

                              autopagination: false,

                              autoplay: <?php echo $autoplay ?>,//default 5000,

                              autorestart: true

                         });

                         });

                   </script>
	}
?>	
					
				    <?php if($this->countModules('breadcrumb')) : ?>
			            <div id="breadcrumb">
				            <div id="pathway"><p>You Are here:
                                <jdoc:include type="modules" name="breadcrumb" /></p>
                            </div>
					    </div>
			        <?php endif; ?>
					 
			         
					   <?php if ($this->countModules( 'left or right ' )) : ?>
						    <div id="colonnewrap">
							    <div id="left">
	                                <jdoc:include type="modules" name="left" style="xhtml" />
	                             </div> 
									<div id="right">
	                                    <jdoc:include type="modules" name="right" style="xhtml" />
	                                </div>
							</div>
						<?php endif; ?>
								  <div id="main<?php echo $width; ?>">
									 <jdoc:include type="component" />
						          </div>
								  
								    <?php if ($this->countModules('user1') || $this->countModules('user2') || $this->countModules('user3')) { ?>
								    <div id="users-box">
				                        <div class="user1box">
						                    <jdoc:include type="modules" name="user1" style="xhtml" />
					                    </div>
										<div class="sep"></div>
					                    <div class="user2box">
						                    <jdoc:include type="modules" name="user2" style="xhtml" />
					                    </div>
										<div class="sep"></div>
					                    <div class="user3box">
						                    <jdoc:include type="modules" name="user3" style="xhtml" />
					                    </div>
				                    </div><?php } ?>
									<div id="footer">
									    <div id="footer_tm">
										<div id="search"> 
										<jdoc:include type="modules" name="user4"  />
										</div>
						                    <div class="ftb">
                                                Copyright&copy; <?php echo date( 'Y' ); ?> <?php echo $mainframe->getCfg('sitename');?>
								            </div>
							            </div>
                                            <div id="top">
                                                <div class="top_button">
                                                    <a href="#" onclick="scrollToTop();return false;">
						                            <img src="templates/<?php echo $this->template ?>/images/top.jpg" width="30" height="30" alt="top" /></a>
                                                </div>
			                                 </div>
									 </div>
	</div>
	<div id="tool">
        <jdoc:include type="modules" name="login" /> 
    </div>
		

</body>
</html>

Re: Trying to modify the Brander template

Posted: Thu Feb 09, 2012 4:51 am
by chrisiiv
Hi,

I got same message:
Parse error: syntax error, unexpected '<' in ... /templates/brander/index.php on line 88

How can I fix it?

Best regards,
chris

Re: Trying to modify the Brander template

Posted: Fri May 04, 2012 9:17 pm
by xelag
I'v solves the parse error with this code (problem of pairs "<?php" and "?>") :

Code: Select all

<?php
$menu = & JSite::getMenu();
if ($menu->getActive() == $menu->getDefault())
{
        echo('<div id="gallery"><div id="tittleslide"><h3>');
        
        echo $tittle ?></h3></div>


                 <div id="faded">

                        <ul>

                            <li><img src="templates/<?php echo $this->template ?>/images/slide11.jpg" alt="" /></li>

                            <li><img src="templates/<?php echo $this->template ?>/images/slide22.jpg" alt="" /></li>

                            <li><img src="templates/<?php echo $this->template ?>/images/slide33.jpg" alt="" /></li>

                            <li><img src="templates/<?php echo $this->template ?>/images/slide44.jpg" alt="" /></li>

                     <li><img src="templates/<?php echo $this->template ?>/images/slide55.jpg" alt="" /></li>

                  </ul>

                             

                    </div>

               </div>

                <script type="text/javascript">

                         var $j = jQuery.noConflict();

                             $j(function(){

                             $j("#faded").faded({

                              speed:<?php echo $speed ?>,// 900,

                              crossfade: true,

                              autopagination: false,

                              autoplay: <?php echo $autoplay ?>,//default 5000,

                              autorestart: true

                         });

                         });

                   </script>
<?php } ?>
A+
Alex