Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » control page.ss

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, biapar, Willr, Ingo, simon_w

Page: 1
Go to End
Author Topic: 1222 Views
  • rube
    Avatar
    Community Member
    8 Posts

    control page.ss Link to this post

    hi
    I have an urgent request!! I wanted to know how to control the page.ss, What I need to know is:
    When I enter the homepage, I have this structure:
    (image content.jpg)

    -<body>
    -<div id="wrap">
    +<div id="header">

    - <div id="content-wrap">
    - <div id="content">
    +<div id="sidebar">
    +<div id="main">

    </div>
    </div>

    But when I click on another menu link that has a new structure
    (image content2.jpg)

    -<body>
    -<div id="wrap">
    +<div id="header">

    - <div id="content-wrap">
    - <div id="content">
    +<div id="sidebar">
    +<div id="main">
    +<div id="navSec">

    </div>
    </div>

    I already created the new div=”navSec” so that other links besides the homepage have this structure. What I can´t figure out is how to have this control. Thanks for your help!!

    Rube

  • Willr
    Avatar
    Forum Moderator
    5489 Posts

    Re: control page.ss Link to this post

    Has the homepage got a custom Page type or is it just a standard page? If it has its own page type eg HomePage.php you can create a HomePage.ss file which has the custom code in it. Or if you could add this in your Page.ss

    (homepage must have the url 'home'

    <% if InSection(home) %>
    // code only for home page
    <% end_if %>

  • rube
    Avatar
    Community Member
    8 Posts

    Re: control page.ss Link to this post

    First thank you,

    I was checking the tutorial, and I saw that says:Each page type is represented by two php classes This is in:
    tutorial/code.

    I have to copy the code and stick in a new HomePage.ss in the folder:

    themes\(my_theme)\template\templates\Layout ?

    and to continue making

    db/build?flush=1

    But I do not have the following image:

    homepage.jpg

    I fail to obtain a HomePage.ss

    Thanks again, and I'm sorry for my spelling, I am a Latino boy.

    Rube.

  • rube
    Avatar
    Community Member
    8 Posts

    Re: control page.ss Link to this post

    image:
    homepage.jpg

    1222 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.