21295 Posts in 5734 Topics by 2602 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 542 Views |
-
Strange Question about $variable

30 March 2009 at 12:56pm
I'm new and I'm just trying to better understand everything so I apologize for the simple question.
When I use a variable in a page such as: $Breadcrumbs
Is the $Breadcrumbs actually referencing the class that has been built?
I'm trying to put a login at the top of the page and I'm working through understanding who to best accomplish this.
I've attached a pic of what it will look like.
Thanks for your thoughts,
Terry
-
Re: Strange Question about $variable

30 March 2009 at 1:03pm
Hi Terry
$Breadcrumbs is a function in sapphire/core/model/SiteTree.php which returns the breadcrumbs trail. $Variable is either a function in the model/controller or a field attached to the current page or one of its decendents.
To use the login form simply add $LoginForm to your template. To style it you might want to wrap it in a div with a unique ID so that you can easily target the elements in that specifig login form.
-
Re: Strange Question about $variable

30 March 2009 at 3:15pm
Is there somewhere that reveals all the functions? I saw some documentation early that looked like it might what I'm looking for.
Again, this is very helpful. I'm really enjoying working with SilverStripe.
Terry
-
Re: Strange Question about $variable

30 March 2009 at 7:41pm
Hi Terry
Here's a list of the built in controls:
http://doc.silverstripe.com/doku.php?id=built-in-page-controlsA lot of them aren't explained, but at least they're listed on the bottom of the page.
| 542 Views | ||
|
Page:
1
|
Go to Top |



