WebsiteBaker Logo
  • *
  • Templates
  • Help
  • Add-ons
  • Download
  • Home
*
Welcome, Guest. Please login or register.

Login with username, password and session length
 

News


WebsiteBaker 2.13.8 is now available!


R.I.P Dietmar (luisehahne) and thank you for all your valuable work for WB
https://forum.websitebaker.org/index.php/topic,32355.0.html


* Support WebsiteBaker

Your donations will help to:

  • Pay for our dedicated server
  • Pay for domain registration
  • and much more!

You can donate by clicking on the button below.


  • Home
  • Help
  • Search
  • Login
  • Register

  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Templates, Menus & Design »
  • Template Problems
  • Print
Pages: [1]   Go Down

Author Topic: Template Problems  (Read 7628 times)

stormswimmer

  • Guest
Template Problems
« on: June 16, 2008, 04:55:23 AM »
Hey,

I am having trouble with the template multiflex-3. I made some changes in the CSS file, but for some reason I can't change the information in the section blocks. I am new to WebsiteBaker so perhaps I am managing the sections incorrectly. Here is the index.php file. Thank you

stormswimmer

Code: [Select]
<?php

/*

 WebsiteBaker Project <http://www.WebsiteBaker.org/>
 Copyright (C) 2004-2006, Ryan Djurovich

 WebsiteBaker is free software; you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
 the Free Software Foundation; either version 2 of the License, or
 (at your option) any later version.

 WebsiteBaker is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.

 You should have received a copy of the GNU General Public License
 along with WebsiteBaker; if not, write to the Free Software
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

*/

?>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">


<!--  Version: Multiflex-3 Version 1.8 / Layout-4         -->
<!--  Date:    May 22, 2007                               -->
<!--  Author:  G. Wolfgang                                -->
<!--  License: Fully open source without restrictions.    -->
<!--           Please keep footer credits with a link to  -->
<!--           Wolfgang (www.1-2-3-4.info). Thank you!    -->

<head>
  <meta http-equiv="Content-Type" content="text/html; charset=<?php if(defined(&#39;DEFAULT_CHARSET&#39;)) { echo     DEFAULT_CHARSET; } else { echo &#39;utf-8&#39;; }?>" />
  <meta http-equiv="cache-control" content="no-cache" />
  <meta http-equiv="expires" content="3600" />
  <meta name="revisit-after" content="2 days" />
  <meta name="robots" content="index,follow" />
  <meta name="author" content="Design: Wolfgang (www.1-2-3-4.info) / Modified: Erik Coenjaerts" />
  <meta name="distribution" content="global" />
  <meta name="description" content="<?php page_description(); ?>" />
  <meta name="keywords" content="<?php page_keywords(); ?>" />
  <link rel="stylesheet" type="text/css" media="screen,projection,print" href="<?php echo TEMPLATE_DIR; ?>/layout_setup.css" />
  <link rel="stylesheet" type="text/css" media="screen,projection,print" href="<?php echo TEMPLATE_DIR; ?>/layout_text.css" />
  <title><?php page_title(); ?></title>
  <link rel="icon" type="image/x-icon" href="./img/favicon.ico" />
</head>

<!-- Global IE fix to avoid layout crash when single word size wider than column width -->
<!--[if IE]><style type="text/css"> body {word-wrap: break-word;}</style><![endif]-->

<body>
  <!-- Main Page Container -->
  <div class="page-container">

    <!-- For alternative headers START PASTE here -->

    <!-- A. HEADER -->     
    <div class="header">
        <!-- Navigation Level 1 -->
        <div class="nav1">

            <?php show_menu2(2, SM2_ROOT, SM2_START); ?>

        </div>
     
      <!-- A.2 HEADER MIDDLE -->
      <div class="header-middle"> 
      <img src="<?php echo TEMPLATE_DIR; ?>/img/green.jpg" alt="Image description" /> 
   
        <!-- Site message -->
        <div class="sitemessage">
           
        </div>       
      </div>
     
      <!-- A.3 HEADER BOTTOM -->
      <div class="header-bottom">

        <!-- Navigation Level 2 (Drop-down menus) -->
        <div class="nav2">

          <!-- Navigation item -->
          <ul>
          <?php show_menu2(1, SM2_ROOT, SM2_ALL,SM2_ALL,&#39;<li>[a][menu_title]
                        
[if(class==menu-expand){<!--[if IE 7]><!--></a><!--<![endif]--><!--[if lte IE 6]><table><tr><td><![endif]--><ul>}]
                        [if(class!=
menu-expand){</a>}]
                        [if(class!=
menu-last){</li>}]
                        [if(class==
menu-last){</li></ul><!--[if lte IE 6]></td></tr></table></a><![endif]-->}]&#39;,&#39;&#39;,&#39;&#39;,&#39;&#39;); ?>

          </ul>

        </div>
      </div>

      <!-- A.4 HEADER BREADCRUMBS -->

      <!-- Breadcrumbs -->
      <div class="header-breadcrumbs">

        <?php show_menu2(0, SM2_ROOT, SM2_CURR, SM2_CRUMB, &#39;<li>[a][menu_title]</a></li>&#39;,&#39;&#39;,&#39;[if(level>0){}][if(level==0){<ul>}]&#39;,&#39;&#39;);?>
        </ul>

        <!-- Search form -->
        <?php if(SHOW_SEARCH) { ?>
          <div class="searchform">
            <form name="search" action="<?php echo WB_URL.&#39;/search/index&#39;.PAGE_EXTENSION; ?>" method="post">
              <fieldset>
                <input name="string" class="field"  value=" <?php echo $TEXT[&#39;SEARCH&#39;]; ?>..." />
                <input type="submit" name="button" class="button" value="GO" />
              </fieldset>
            </form>
          </div>
        <?php } ?>
      </div>
    </div>

    <!-- For alternative headers END PASTE here -->

    <!-- B. MAIN -->
    <div class="main" style="background-color:#FFFFFF;">
 
      <!-- B.1 MAIN NAVIGATION -->
      <div class="main-navigation">

        <!-- Navigation Level 3 -->
        <div class="round-border-topright"></div>
        <h1 class="first">Other Menu</h1>

        <!-- Subtitle -->
        <h2>Handy Stuff</h2>

        <!-- Navigation with bullets -->
        <dl class="nav3-bullet">
          <?php show_menu2(3, SM2_ROOT, SM2_ALL, SM2_ALL,&#39;[if(level>0){<dd>}][if(level==0){<dt>}][a][menu_title]</a>[if(level>0){</dd>}][if(level==0){</dt>}]&#39;);?>
        </dl>
                       
        <!-- Login -->
        <?php if(FRONTEND_LOGIN AND !$wb->is_authenticated()) {?>
          <h1><?php echo $TEXT[&#39;LOGIN&#39;]; ?></h1>
          <div class="loginform">
            <form method="post" action="<?php echo LOGIN_URL; ?>">
              <fieldset>
                <p><label for="username" class="top"><?php echo $TEXT[&#39;USERNAME&#39;]; ?></label><br />
                  <input type="text" name="username" id="username_1" tabindex="1" class="field" onkeypress="return webLoginEnter(document.loginfrm.password);" value="" /></p>
                <p><label for="password_1" class="top"><?php echo $TEXT[&#39;PASSWORD&#39;]; ?></label><br />
                  <input type="password" name="password" id="password_1" tabindex="2" class="field" onkeypress="return webLoginEnter(document.loginfrm.cmdweblogin);" value="" /></p>
                <p><input type="submit" name="submit" class="button" value="<?php echo $TEXT[&#39;LOGIN&#39;]; ?>"  /></p>
                <p><a href="<?php echo FORGOT_URL; ?>"><?php echo $TEXT[&#39;FORGOT_DETAILS&#39;]; ?></a></p>
              <?php if(is_numeric(FRONTEND_SIGNUP)) { ?>
                <p><a href="<?php echo SIGNUP_URL; ?>"><?php echo $TEXT[&#39;SIGNUP&#39;]; ?></a></p>
              <?php } ?>
              </fieldset>
            </form>
          </div>
        <?php } elseif(FRONTEND_LOGIN AND $wb->is_authenticated()) {?>
          <h1><?php echo $TEXT[&#39;LOGIN&#39;]; ?></h1>
          <div class="loginform">
            <form name="logout" action="<?php echo LOGOUT_URL; ?>" method="post">
                <p><?php echo $TEXT[&#39;LOGGED_IN&#39;]; ?></p>
                <p><?php echo $TEXT[&#39;WELCOME_BACK&#39;]; ?>,<br /> <a href="<?php echo PREFERENCES_URL; ?>"><?php echo $wb->get_display_name(); ?></a></p>
                <input type="submit" name="submit" value="<?php echo $MENU[&#39;LOGOUT&#39;]; ?>" />
            </form>
          </div>
        <?php } ?>

      </div>

      <!-- B.1 MAIN CONTENT -->
      <div class="main-content">

        <!-- Pagetitle -->
        <h1 class="pagetitle"><?php page_title(&#39;&#39;,&#39;[PAGE_TITLE]&#39;); ?></h1>
        <?php page_content(); ?>

      </div>

      <!-- B.3 SUBCONTENT -->
      <div class="main-subcontent" style="background-color:#FFFFFF;">

        <!-- Subcontent unit -->
        <div class="subcontent-unit-border">
          <div class="round-border-topleft"></div><div class="round-border-topright"></div>
          <h1>Latest News</h1>
          <?php include (WB_URL."/pages/blocks/latest-news.php"); ?>
        </div>

        <!-- Subcontent unit -->
        <div class="subcontent-unit-border-blue">
          <div class="round-border-topleft"></div><div class="round-border-topright"></div>
          <h1 class="blue">Blue - Border</h1>
          <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</p>
        </div>

        <!-- Subcontent unit -->
        <div class="subcontent-unit-border-green">
          <div class="round-border-topleft"></div><div class="round-border-topright"></div>
          <h1 class="green">Green - Border</h1>
          <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</p>
        </div>

        <!-- Subcontent unit -->
        <div class="subcontent-unit-border-orange">
          <div class="round-border-topleft"></div><div class="round-border-topright"></div>
          <h1 class="orange">Orange - Border</h1>
          <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</p>
        </div>

        <!-- Subcontent unit -->
        <div class="subcontent-unit-noborder">
          <div class="round-noborder-topleft"></div><div class="round-noborder-topright"></div>
          <h1>Grey - No border</h1>
          <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</p>
        </div>

        <!-- Subcontent unit -->
        <div class="subcontent-unit-noborder-blue">
          <div class="round-noborder-topleft"></div><div class="round-noborder-topright"></div>
          <h1 class="blue">Blue - No border</h1>
          <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</p>
        </div>

        <!-- Subcontent unit -->
        <div class="subcontent-unit-noborder-green">
          <div class="round-noborder-topleft"></div><div class="round-noborder-topright"></div>
          <h1 class="green">Green - No border</h1>
          <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</p>
        </div>

        <!-- Subcontent unit -->
        <div class="subcontent-unit-noborder-orange">
          <div class="round-noborder-topleft"></div><div class="round-noborder-topright"></div>
          <h1 class="orange">Orange - No border</h1>
          <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</p>
        </div>

      </div>
    </div>

    <!-- C. FOOTER AREA -->

    <div class="footer">
      <p>Copyright &copy; 2007 <?php page_title(&#39;&#39;,&#39;[WEBSITE_TITLE]&#39;); ?> | All Rights Reserved</p>
      <p class="credits">Design by <a href="http://1-2-3-4.info/" title="Designer Homepage">G. Wolfgang</a>  | Modified by <a href="#" title="Modifyer Homepage">Your Name</a> | Powered by <a href="http://www.WebsiteBaker.org/" target="_blank">WebsiteBaker</a></p>
    </div>
  </div>

</body>
</html>



Logged

Availor

  • Guest
Re: Template Problems
« Reply #1 on: June 16, 2008, 07:02:57 AM »
You have only one "page_content();" If you want to add blocks you must define them in info.php

Add just above the last line of "?>" $block[2]='content2';  etc.... and in the index file add page_content(2); wherever you want it to appear.

http://help.WebsiteBaker.org/pages/en/advanced-docu/designer-guide/content-blocks.php
Logged

stormswimmer

  • Guest
Re: Template Problems
« Reply #2 on: June 17, 2008, 02:59:05 AM »
Here is my info.php file.
Code: [Select]
<?php

/*

 WebsiteBaker Project <http://www.WebsiteBaker.org/>
 Copyright (C) 2004-2006, Ryan Djurovich

 WebsiteBaker is free software; you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
 the Free Software Foundation; either version 2 of the License, or
 (at your option) any later version.

 WebsiteBaker is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.

 You should have received a copy of the GNU General Public License
 along with WebsiteBaker; if not, write to the Free Software
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

*/


$template_directory = &#39;Multiflex-3&#39;;
$template_name = &#39;Multiflex-3&#39;;
$template_version = &#39;1.0&#39;;
$template_platform = &#39;2.x&#39;;
$template_author = &#39;Erik Coenjaerts (http://www.coenjaerts.com)&#39;;
$template_license = &#39;GNU General Public License&#39;;
$template_description = &#39;Original Design by Wolfgang (http://www.1-2-3-4.info)/Modified for WB by Erik Coenjaerts&#39;;
$menu[1]=&#39;Main Menu&#39;;
$menu[2]=&#39;Top Menu&#39;;
$menu[3]=&#39;Extra Menu&#39;;
$block[2]=&#39;Sidebar&#39;;
$block[3]=&#39;News&#39;;

?>

What does this code do in index.php?

Code: [Select]
<?php include (WB_URL."/pages/blocks/latest-news.php"); ?>
Logged

doc

  • Guest
Re: Template Problems
« Reply #3 on: June 17, 2008, 07:00:44 AM »
Hello,

please read the help of the forum, the PHP documentation and the WB documentation available before posting.

Adding long code as text file: read here (attach long code as file is the better choice)
What is the PHP function include for: read here (also a good starting point for other PHP questions)
WB documentation about templates: read here

Christian
« Last Edit: June 17, 2008, 07:04:17 AM by doc »
Logged

stormswimmer

  • Guest
Re: Template Problems
« Reply #4 on: June 17, 2008, 08:20:50 PM »
Thank you
Logged

stormswimmer

  • Guest
Re: Template Problems
« Reply #5 on: June 18, 2008, 11:11:28 PM »
I'm trying to add a global block to my template. However, I have been unsuccessful. I read the tutorial at http://www.websitebakerden.com/pages/posts/adding-global-block-to-show-on-all-pages24.php and followed the directions. I created http://balanceyourmetabolism.com/WebsiteBaker-2.7.0/wb/pages/blocks/links.php and http://balanceyourmetabolism.com/WebsiteBaker-2.7.0/wb/pages/blocks/blocks1.php then inserted
Code: [Select]
<?php include (WB_URL."/pages/blocks/links.php"); ?> and
Code: [Select]
<?php include (WB_URL."/pages/blocks/blocks1.php"); ?> into my template. Have I overlooked something?
Logged

Offline Ruud

  • Posts: 3671
  • Gender: Male
  • Do not use PM for help! Please use the forum!
    • Dev4Me - Professional WebsiteBaker Development
Re: Template Problems
« Reply #6 on: June 29, 2008, 12:16:13 AM »
Try using WB_PATH instead of WB_URL.

@Availor:
You might want to change that in your tutorial. WB_URL will not work.

Ruud
Logged
Dev4me - WebsiteBaker modules - WBhelp.org

  • Print
Pages: [1]   Go Up
  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Templates, Menus & Design »
  • Template Problems
 

  • SMF 2.0.19 | SMF © 2017, Simple Machines
  • XHTML
  • RSS
  • WAP2