Jump to:

3393 Posts in 976 Topics by 852 members

Template Questions

SilverStripe Forums » Template Questions » www.domain.com/USERNAME -> template question

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

Page: 1
Go to End
Author Topic: 664 Views
  • danzzz
    Avatar
    Community Member
    175 Posts

    www.domain.com/USERNAME -> template question Link to this post

    hi,

    I have a own controller to handle request like http://www.domain.com/USERNAME
    For this request I call the UController:

    class UController extends Page_Controller
    {

    public function init() {
    parent::init();
    }

    public function index() {

       print_r($this->request);
    return $this->renderWith("Page.ss");

    }

    public function someaction() {

    // no renderWidth, so no theme/template ???

    }

    }

    If I call such a URL like http://www.domain.com/USERNAME the page is white, empty, without a template.
    How can I set a own theme for such URLs which fits for all actions?

    thx

  • danzzz
    Avatar
    Community Member
    175 Posts

    Re: www.domain.com/USERNAME -> template question Link to this post

    I did it this way:

    public function handleAction($request) {
    ....
    return $this->renderWith('U');
    }

    ... or are there other ways ... ?

    664 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.