Welcome, Guest. Please login or register.
Did you miss your activation email?
May 27, 2012, 04:43:09 AM

Login with username, password and session length
Search:     Advanced search
Interested in joining the WebsiteBaker team?
For more Information read here or on our new website.
155555 Posts in 21715 Topics by 7737 Members
Latest Member: gx-world
* Home Help Search Login Register
Pages: [1]   Go Down
Print
Author Topic: Introducing myself and a new small module  (Read 1406 times)
belba

Offline Offline

Posts: 1


« on: February 06, 2008, 05:15:17 PM »

Hello,

my name is Guido aka belba. I'm a newby at this board but not a newby at WB. I'm using WB for several projects.

For a current project I have to use WB for some reasons, for example the webserver offers only a MySQL DB V4.0 and it it dossen't support a customer .htacces file.

A special problem was that I have for the hompage severeal sections (about 20) to mange. For this numbers of sections is the standart way to manage pretty uncomfortable.

My idea was that I create severeal chlid-pages as type WYSIWYG and that I include this pages as kind as subcontentpages in the homepage.
A possible site struckture could looks like this:

    Homepage (defaulttemplate)
      - top20 (contains sub content fof homepage, templatetop20; visibility = none)
      - description of shop 1 (contains sub content fof homepage, templateshopdescrip tion; visibility = none)
      - description of shop 2 (contains sub content fof homepage, templateshopdescrip tion; visibility = none)
      - description of shop 3 (contains sub content fof homepage, templateshopdescrip tion; visibility = none)
      - description of shop 4 (contains sub content fof homepage, templateshopdescrip tion; visibility = none)
      - description of shop 5 (contains sub content fof homepage, templateshopdescrip tion; visibility = none)
      - description of shop 6 (contains sub content fof homepage, templateshopdescrip tion; visibility = none)
      - impress (is a regular page, defaulttemplate, visibility = public)
      - tips & tricks (is a regular page, defaulttemplate, visibility = public)

For this Problem I wrote a code snippet module. In the defaulttemplate you can call it with page_sub_content(PAGE-ID) and it built in your sub-page as sub-content.
An simple example:

At firstd you create one or several sub pages with the template "defaulttemplate"
It is Important that the childpages are switched to the visibility to none.
The Template "templateshopdescrip tion" contains this:

<div style="color: #ffffff; background-color: #394a5a; padding: 5px;">
  <strong> A Nice Title</strong>
    <div style="color: #000000; background-color: #ffffff;">
      <?php page_content(); ?>
    </div>
</div>

Than you create a mainpage wit the dedefaulttemplate. Here ist it important to fill in the right page_id's from the sub-pages in the page_sub_content function.
The defaulttemplate contains following:

<html>
<header>
    <title>....</title>
        .
        .
</header>
<body>
    <div id="col1">
        <?php show_menu(); ?>
    </div>
    <div id="col2">
        <?php page_sub_content(5); ?>
    </div>
    <div id="col3">
        <?php page_sub_content(6); ?>
    </div>
    <div id="col4">
        <?php page_sub_content(7); ?>
    </div>
    <div id="col5">
        <?php page_sub_content(Cool; ?>
    </div>
</body>
</html>


As result you get a mainpage with the content of several subpages.

Ok I think I  have more as enought written for my first posting here and I know my english ist not the best, but I hope it is still understandable smiley

Guido
Logged
diodak

Offline Offline

Posts: 85


« Reply #1 on: February 09, 2008, 08:28:12 PM »

Thats good idea, Thanks.
Logged

Buchsbaum
jena6

Offline Offline

Posts: 12


WWW
« Reply #2 on: February 19, 2008, 03:00:47 AM »

thanks belba, i have wanted to do this.
Logged

A black man kills a dog, he goes to jail - you kill a little black boy and nothing happens
..in loving memory, Martin Lee Anderson
Lotus

Offline Offline

Posts: 184


« Reply #3 on: February 21, 2008, 05:30:51 PM »

Ofcourse..this is how to do it!!! Great!!

I thought about making some pages visibility hidden with the "smallest" of templates (so the page just holds the content put in with the WYSIWYG editor) that holds the subinformation then load them into the template using a PHP include knowing that some might find the subpage as it is not visibility none.

Thanx!

Logged
cnwb

Offline Offline

Posts: 234



WWW
« Reply #4 on: August 04, 2008, 02:40:19 PM »

I just came across this yesterday and none of it makes sense!!
Would some one please explain this properly, break it down
and explain it better. (More Details)

Quote
hompage severeal sections (about 20) to mange.
what is it 7 or 20.
Quote
My idea was that I create severeal chlid-pages as type WYSIWYG and that I include this pages as kind as subcontentpages in the homepage.
A possible site struckture could looks like this:

    Homepage (defaulttemplate)
      - top20 (contains sub content fof homepage, templatetop20; visibility = none)
      - description of shop 1 (contains sub content fof homepage, templateshopdescrip tion; visibility = none)
      - description of shop 2 (contains sub content fof homepage, templateshopdescrip tion; visibility = none)
      - description of shop 3 (contains sub content fof homepage, templateshopdescrip tion; visibility = none)
      - description of shop 4 (contains sub content fof homepage, templateshopdescrip tion; visibility = none)
      - description of shop 5 (contains sub content fof homepage, templateshopdescrip tion; visibility = none)
      - description of shop 6 (contains sub content fof homepage, templateshopdescrip tion; visibility = none)
      - impress (is a regular page, defaulttemplate, visibility = public)
      - tips & tricks (is a regular page, defaulttemplate, visibility = public)
break this down in a way that anyone who reads this will understand!

Quote
At firstd you create one or several sub pages with the template "defaulttemplate"
It is Important that the childpages are switched to the visibility to none.
The Template "templateshopdescrip tion" contains this:
Again as stated please be more clear when you are pointing out things
What is the differance between "defaulttemplate" and "templateshopdescrip tion"? and is "templateshopdescrip tion" a new, differnet template?
If so do we need to make one, or do we need to download one? If so Where?



Quote
For this Problem I wrote a code snippet module. In the defaulttemplate you can call it with page_sub_content(PAGE-ID) and it built in your sub-page as sub-content.
An simple example:
ok again whats the problem nothing explained here.. and what defualttemplate? Is this the Default settings template. And wher and what page_sub_content(PAGE-ID)? Where is this being pulled from in the MYSQL DATABASE need to be more clear here

Logged

Pages: [1]   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!