Jump to:

23483 Posts in 18965 Topics by 2878 members

General Questions

SilverStripe Forums » General Questions » How do you know all the placeholders dependent on another? For example, $Tranlations

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

Page: 1
Go to End
Author Topic: 364 Views
  • Josua
    Avatar
    Community Member
    86 Posts

    How do you know all the placeholders dependent on another? For example, $Tranlations Link to this post

    Hi!

    I would like to know all the dependent placeholders of another placeholder.
    For example, $Locale is a placeholder dependent of $Translations placeholder.

    ¿$Translations has more placeholders?
    Which does he have?
    Are they in the documentation? Where?
    Do I have to see the SilverStripe source code to discover them?
    Which class in SilverStripe correspond to $Translations placeholder?

    Thanks,

    Regards,
    Jose A.

  • Chris_Bryer
    Avatar
    Community Member
    35 Posts

    Re: How do you know all the placeholders dependent on another? For example, $Tranlations Link to this post

    locale is a column on the sitetree table in the database that is added once you add the translatable extension to sitetree.. $locale would insert the contents of the locale column in a record into a template, but you could also insert stuff from php functions (like $Link) to dump a page link into its template. this is covered really nicely in the tutorials (there are 5 main tutorials that really get people started here but if you want to see a standard list of built in page controls (mainly from the SiteTree or ContentController classes) look here.

    i think translations is a control block that returns all the pages (subclasses of SiteTree) in the current page's translation group. you can then call any function in the Page / SiteTree class once you're in the translations control block.

    hope it helps.
    -Chris

  • Josua
    Avatar
    Community Member
    86 Posts

    Re: How do you know all the placeholders dependent on another? For example, $Tranlations Link to this post

    Now I understand this a little more.

    Thank you very much for the explanation Chris.

    Regards,
    Jose A.

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