Login | Forgot password | Register

X

What is OpenID?

OpenID is an Internet-wide identity system that allows you to sign in to many websites with a single account.

With OpenID, your ID becomes a URL (e.g. http://username.myopenid.com/). You can get a free OpenID for example from myopenid.com.

For more information visit the official OpenID site.

Jump to:

17480 Posts in 4474 Topics by 1973 members

Archive

SilverStripe Forums » Archive » control page.ss

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

Page: 1
Go to End
Author Topic: control page.ss 696 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
    Moderator
    1823 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

    696 Views
Page: 1
Go to Top

Currently Online: There is nobody online.

Welcome to our latest member: marcusl

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

Comments on this website? Please give feedback.