Welcome, Guest. Please login or register.
January 06, 2009, 05:50:40 AM

Login with username, password and session length
Search:     Advanced search
Website Baker 2.7.0 (stable) released!
For more information look here.
The announcement board can be found here.
71095 Posts in 11245 Topics by 6867 Members
Latest Member: sababa
* Home Help Search Login Register
+  Website Baker Community Forum
|-+  English
| |-+  Templates (Moderators: Argos, ruebenwurzel, BerndJM)
| | |-+  Woot! I feel so smart. Blocks / Mult Menu Guide.
Poll
Question: Did you find this useful?  (Voting closed: June 12, 2005, 03:39:18 PM)
Yes - 7 (87.5%)
No - 1 (12.5%)
Total Voters: 7

Pages: [1] 2 Go Down Print
Author Topic: Woot! I feel so smart. Blocks / Mult Menu Guide.  (Read 16173 times)
Steven Holder
The Template Master
Geek-Like Baker
*****
Offline Offline

Posts: 494


steven@hackvoid.com Stevo+Holder Aonxe
WWW Email
« on: June 12, 2005, 03:38:24 PM »

Ok, I was trying to give myself a crash course on all the new features wb has gotten over the past month or 2. I think I covered most of all the features I need to worry about being one of the template gods and what ever.

Here we go now, how to use the blocks and multiple menu features.

Blocks

1. In your index.php part of your template put
Code:
<?php page_content(2); ?>
where ever you want your block to go.
2. Now in the info.php part, put
Code:
$block[2]='Block 2';
anywhere in there.
3. Now install your template.
4. On a page of your site, lets say the Home page, go to Manage Sections, then add another What u see is what u get thing and then in the drop down thing Select Block 2 and that WYSIWYG section will appear where you wanted it to.

Troubleshooting

Question: I dont have the drop down thing....
Answer: You havent enabled blocks in you Settings Section.

That should be done with Blocks, now on to Menus which are about the same thing.

Menus

1. In your templates index.php, put the code
Code:
<?php page_menu(0,2); ?>
where you want your second menu to appear.
2. In your info.php place
Code:
$menu[2]='Menu 2';
anywhere in there.
3. Install your templte.
4. Now create a page that you want to go in Menu 2.
5. Go to Modify Page Settings and where it has the Dropdown box next to "Menu" Select Menu 2. Your link should appear where you wanted it to.

Troubleshooting

Question: I dont have the menu section with drop down thing....
Answer: You havent enabled muntiple menus in you Settings Section.


Note: MAKE SURE YOU HAVE ENABLED THESE FEATURES IN YOUR SETTINGS SECTION!

Hope this helped out some people.
« Last Edit: September 29, 2005, 12:46:40 PM by Steven Holder » Logged

-Steven Holder (Silverfeces)
http://aonxe.com

Get Paid Every Month, No Investment!
pcwacht
Guest
« Reply #1 on: June 12, 2005, 08:08:44 PM »

Thanks, you sure helped me out .. Wink
Logged
Hans
Master Baker
*****
Offline Offline

Posts: 370


Email
« Reply #2 on: June 12, 2005, 08:50:26 PM »

Thanks man!
Logged

Hans - Nijmegen - The Netherlands
zigx
Pending Apprentice Baker
**
Offline Offline

Posts: 11


« Reply #3 on: June 17, 2005, 01:16:57 AM »

I just read: http://www.websitebaker.org/docs/chapters/create_additional_editable_content_blocks49.html

and i just totally do not understand.  How do i get the new "block" ??
Logged
Steven Holder
The Template Master
Geek-Like Baker
*****
Offline Offline

Posts: 494


steven@hackvoid.com Stevo+Holder Aonxe
WWW Email
« Reply #4 on: June 18, 2005, 12:16:14 AM »

You have to hardcode the new block into your template where you want it to appear.
Logged

-Steven Holder (Silverfeces)
http://aonxe.com

Get Paid Every Month, No Investment!
Stefan
Guest
« Reply #5 on: August 09, 2005, 10:20:27 PM »

Steven your link doesn't work anymore.
Logged
Steven Holder
The Template Master
Geek-Like Baker
*****
Offline Offline

Posts: 494


steven@hackvoid.com Stevo+Holder Aonxe
WWW Email
« Reply #6 on: August 10, 2005, 11:02:33 PM »

k, im not using wb right now, coding from scratch.
Logged

-Steven Holder (Silverfeces)
http://aonxe.com

Get Paid Every Month, No Investment!
Ryan
Administrator
A Baker's Baker
*****
Online Online

Posts: 2066


Jabber: rdjurovich@jabber.org.au

ryan@djurovich.com rdjurovich rdjurovich
WWW
« Reply #7 on: August 11, 2005, 08:15:55 AM »

Steven your link doesn't work anymore.
http://www.websitebaker.org/projects/websitebaker2/wiki/Docs-Advanced-Howtos-Create-additional-editable-content-blocks
 cool
Logged

Website Baker Project Admin
www.websitebaker.org

To contact me via email, visit:
www.ryandjurovich.com/contact
mightofnight
Senior Baker
*****
Offline Offline

Posts: 153


« Reply #8 on: August 11, 2005, 06:57:33 PM »

is there a example template available that utilizes multiple meus and content blocks?  I like the idea and it's something i like doing mainly becasue i am use to doing it with other CMS's..

 I also never new that this capability was being designed into website baker hence why i started to crate my own menu function, something i wouldn't have done had i new what was available.  I had been fursturated with creating menu's with earler versions of website backer and being very apt at php i started to create my own.
« Last Edit: August 11, 2005, 07:06:17 PM by mightofnight » Logged

-Travis
rsassen
Pending Apprentice Baker
**
Offline Offline

Posts: 12


« Reply #9 on: August 15, 2005, 10:01:58 AM »

When I try to put the code for a second menu into the index.php of the template, I get this error message:

Parse error: parse error, unexpected ';' in /var/www/vhosts/pleitgenootschapgaius.nl/httpdocs/new/templates/round/index.php on line 59

This is how the code looks like:

<!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="en" lang="en">
<head>
<title><?php page_title(); ?></title>
<meta name="description" content="<?php page_description(); ?>" />
<meta name="keywords" content="<?php page_keywords(); ?>" />
<link href="<?php echo TEMPLATE_DIR; ?>/screen.css" rel="stylesheet" type="text/css" media="screen" />
<link href="<?php echo TEMPLATE_DIR; ?>/print.css" rel="stylesheet" type="text/css" media="print" />
</head>
<body>

<table cellpadding="0" cellspacing="0" border="0" align="center" class="main" width="750">
<tr>
   <td colspan="2" class="header" height="80">
      <a href="<?php echo WB_URL; ?>"><img src="<?php echo TEMPLATE_DIR; ?>/banner.jpg" border="0" width="750" height="80" alt="<?php page_title('', '[WEBSITE_TITLE]'); ?>" /></a>
   </td>
</tr>
<tr>
   <?php
   // Only show menu items if we are supposed to
   if(SHOW_MENU) {
   ?>   
   <td style="padding: 10px; background-color: #FFFFFF;" valign="top">
      <table cellpadding="0" cellspacing="0" border="0" width="150" align="center" class="menu">
      <tr>
         <td class="border">
            <img src="<?php echo TEMPLATE_DIR; ?>/menu_top.gif" border="0" alt="" />
         </td>
      </tr>
      <tr>
         <td width="170">
            <?php page_menu(); ?>
            <?php page_menu&#40;0,2&#41;; ?>
         </td>
      </tr>
Logged
ruebenwurzel
Moderator
Dangerous Baker
*****
Offline Offline

Posts: 6586


Keep on Rockin


WWW Email
« Reply #10 on: August 15, 2005, 11:48:48 AM »

Hello,

as Ryan imported the old forum to smf some code's from the old code-section are shown wrong. So in your case the problem is, that you copied the following line from this forum in your templates index.php
Code:
<?php page_menu&#40;0,2&#41;; ?>
the wright code should be
Code:
<?php page_menu(0,2); ?>
then all should work.

The problem with wrong codes is posted here

This is a very very strange problem, because the most bugfixes, codes and code-snippets from this whole great forum don't work anymore  sad sad sad. I hope Ryan find the time to solve this problem. It's only a problem of how smf shows the code from code-section, because in the database from the forum, code seems to be ok. The problem appears only with imported codes, new codes are shown wright, like you see above.

modify:
I looked at the codes from my posts and found a solution for me. I go to modify my post and only saved the post again without doing any changes. And what surprise grin  code is now showing wright.
« Last Edit: August 15, 2005, 12:25:21 PM by ruebenwurzel » Logged

You search for help, please look here: Help-Page
You search for Modules, Templates or Languages, please look here: Addons-Page
rsassen
Pending Apprentice Baker
**
Offline Offline

Posts: 12


« Reply #11 on: August 15, 2005, 12:27:40 PM »

That´s it! thousand times Thanks!  grin
Logged
Ryan
Administrator
A Baker's Baker
*****
Online Online

Posts: 2066


Jabber: rdjurovich@jabber.org.au

ryan@djurovich.com rdjurovich rdjurovich
WWW
« Reply #12 on: August 15, 2005, 02:13:19 PM »

@ruebenwurzel: All fully working code should be attached as a file in the "Completed Code Snippets" section. This way, it defines what actual works, as well as giving a working copy of the code. wink
I don't want to go modifying the forums code if I can help it cool
Logged

Website Baker Project Admin
www.websitebaker.org

To contact me via email, visit:
www.ryandjurovich.com/contact
ruebenwurzel
Moderator
Dangerous Baker
*****
Offline Offline

Posts: 6586


Keep on Rockin


WWW Email
« Reply #13 on: August 15, 2005, 03:30:46 PM »

yes, that's wright. For the future this is the only way that should be gone, and then users can be shure that it works.

But for now we have the problem that we have over 6500 Posts from more as 500 Users and the codes and codesnippets are on to many different places in this forum ( i think this is why you opened the "Completed ...." topics ). And till all theworking code from there is in "Completed ...." Topic, the users have to search and use the code from the forum. So what should be done? Should we wait till every user, who have posted an working code, post this in "Completes ... " too, or should someone of the Forum Admins ( Steven, Stefan ... ) do this?

I don't want, that you waste your time with this, it's much more better you work an WB3. I only thought it's a little problem of the configfile from SWF forum, because all codes are correct in the database from the forum, only on screen they are shown wrong , and how i wrote, a simple saving again solves this problem.
Logged

You search for help, please look here: Help-Page
You search for Modules, Templates or Languages, please look here: Addons-Page
mightofnight
Senior Baker
*****
Offline Offline

Posts: 153


« Reply #14 on: August 15, 2005, 06:02:32 PM »

Ahhhh....

I must have mised the broken imported code post...
Logged

-Travis
Ryan
Administrator
A Baker's Baker
*****
Online Online

Posts: 2066


Jabber: rdjurovich@jabber.org.au

ryan@djurovich.com rdjurovich rdjurovich
WWW
« Reply #15 on: August 16, 2005, 10:37:26 AM »

ruebenwurzel, how do you know that it is stored in the database ok? You can't even see it! wink
Anyways, if it is a configuration option, please let me know what to change and I will do it, otherwise, it stays the same.
I don't care who posts in the "Completed..." sections, as long as someone does it and the person who originally wrote it gets there credits. cool
Logged

Website Baker Project Admin
www.websitebaker.org

To contact me via email, visit:
www.ryandjurovich.com/contact
ruebenwurzel
Moderator
Dangerous Baker
*****
Offline Offline

Posts: 6586


Keep on Rockin


WWW Email
« Reply #16 on: August 16, 2005, 03:31:27 PM »

@ ryan
I cannot see your database, but when i open a post from me to modify this, i see that in the modify window (think this is what's stored in database ? ) all is ok. In the forum you see for example instead of "(" this "#40;" . This appears only in imported threads and only between <? ... ?> in code section. If you store this threads without doing any changes you see in modify window and the forum the wright code. So what do I think should be done is, if its possible, only to save all forum posts. Hope this can be done with one click in your admin interface from this forum. If not, I say don't waste your time with this.
Logged

You search for help, please look here: Help-Page
You search for Modules, Templates or Languages, please look here: Addons-Page
Ryan
Administrator
A Baker's Baker
*****
Online Online

Posts: 2066


Jabber: rdjurovich@jabber.org.au

ryan@djurovich.com rdjurovich rdjurovich
WWW
« Reply #17 on: August 17, 2005, 08:09:48 AM »

@ruebenwurzel: you seem to be confused.
When modifying a post, it has the exact same characters "#blahblah" inserted, but when this code is in a textbox in a form, it can be copied as raw code.
I am not sure if the code in the database is stored encoded or not, but I am guessing that the posts are printed using htmlentities() or something, to stop post text from breaking out of divs, etc.
I cannot help this problem at all it seems.
Logged

Website Baker Project Admin
www.websitebaker.org

To contact me via email, visit:
www.ryandjurovich.com/contact
Steven Holder
The Template Master
Geek-Like Baker
*****
Offline Offline

Posts: 494


steven@hackvoid.com Stevo+Holder Aonxe
WWW Email
« Reply #18 on: September 29, 2005, 12:49:20 PM »

I edited the origional postings a little while ago and made sure they worked...
Logged

-Steven Holder (Silverfeces)
http://aonxe.com

Get Paid Every Month, No Investment!
DrunkMoose
Apprentice Baker
***
Offline Offline

Posts: 53


« Reply #19 on: December 27, 2005, 11:52:21 PM »


Being quite new at WB, what are blocks exactly? I understood it that menus is the place (most likely by default)
at the left containing all your sections and the "Administration" link, right? But what are "blocks" ?

Thanks.
Logged
Pages: [1] 2 Go Up Print 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.7 | SMF © 2006-2008, Simple Machines LLC Valid XHTML 1.0! Valid CSS!