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.6 is now available!


Will it continue with WB? It goes on! | Geht es mit WB weiter? Es geht weiter!
https://forum.websitebaker.org/index.php/topic,32340.msg226702.html#msg226702


The forum email address board@websitebaker.org is working again
https://forum.websitebaker.org/index.php/topic,32358.0.html


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 »
  • Internet Corporation --- Making "Site News" Unique to each page
  • Print
Pages: [1]   Go Down

Author Topic: Internet Corporation --- Making "Site News" Unique to each page  (Read 3852 times)

sandbflag

  • Guest
Internet Corporation --- Making "Site News" Unique to each page
« on: August 18, 2008, 04:14:11 PM »
What would be the best way to make the site news section on the Internet Corporation template different on each page in the site?  Thanks for your time
Logged

aldus

  • Guest
Re: Internet Corporation --- Making "Site News" Unique to each page
« Reply #1 on: August 18, 2008, 04:22:32 PM »
I'm a little bit sorry: but i can't understand this, or did you mean:
on the main-page left-top, on every other page, left-button ...
or realy on every page another place ...

one way could be to use two diff css for the div "left" and "left_subpage" and modify line 37 in the template like
Code: [Select]
<div id="left<? echo PAGE_ID == 1 ? "": "_subpage"; ?>">

So you only have to modify/add the css-rule for the new position of the news in the style.css

Edit:
Another way could be to use switch for differ groups of pages and add differ styles for
repositioning like:
Code: [Select]
<?php
/**
*    The page news are placed on differ places,
*    than on the main-page.
*    
*    @version    0.2.0
*    @date        2008-08-18
*    @author        aldus
*    @state        @dev
*
*    @notice        Maybe you need to modify the first line if your
*                main-page havn&#39;t got the ID 1, e.g. 27 ...
*
*/
    
switch (PAGE_ID) {
        case 
1:
            
$add = "";
            break;
        
        case 
2:
        case 
3:
        case 
7:
        case 
14:
            
$add = "_math_groupe";
            break;
            
        case 
9:
        case 
12:
        case 
32:
            
$add = "_geo_groupe";
            break;
            
        default:
            
$add = "_sub_groupe";
    }
    echo 
"<div id=\"left". $add ."\">\n";
    
page_content(2); 
    echo 
"</div>\n";
?>



Regards
aldus
« Last Edit: August 18, 2008, 04:42:50 PM by aldus »
Logged

  • Print
Pages: [1]   Go Up
  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Templates, Menus & Design »
  • Internet Corporation --- Making "Site News" Unique to each page
 

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