Jump to:

22972 Posts in 11596 Topics by 2824 members

General Questions

SilverStripe Forums » General Questions » SILVERSTRIPE BOOK XML SITE TREE ISSUE

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 2 3 4 5
Go to End
Author Topic: 3232 Views
  • servalman
    Avatar
    Community Member
    211 Posts

    Re: SILVERSTRIPE BOOK XML SITE TREE ISSUE Link to this post

    Thanks very much for that quick answer

    I will try today and let you know how it goes.

    As for the Branch it is just something that a flash component needs to know if there is children or not but I won't use it as I don't use component very much.

    Did you see my question about the getcurrent_locale issue.

    I will be very intersted in your opinion about that

    Thanks again

    Thomas

  • banal
    Avatar
    Community Member
    901 Posts

    Re: SILVERSTRIPE BOOK XML SITE TREE ISSUE Link to this post

    I saw your question regarding get_current_locale and I replied to it here: http://silverstripe.org/general-questions/show/290751?start=0#post290885

    Or did I miss something?

  • banal
    Avatar
    Community Member
    901 Posts

    Re: SILVERSTRIPE BOOK XML SITE TREE ISSUE Link to this post

    Oh sorry. I did miss one post of yours indeed.
    Where do you switch the language in your Page? Are the fields that you use in the template translated to the different language?

    It's hard to tell what exactly your problem is. You should probably (re)read the following: http://doc.silverstripe.org/multilingualcontent

  • servalman
    Avatar
    Community Member
    211 Posts

    Re: SILVERSTRIPE BOOK XML SITE TREE ISSUE Link to this post

    Hi Banal

    I just tried and It works as far as showing the level 1 of my site tree.

    Now I need to export the all thing with menus and sub menus . shall I writte something like this?

    <% control Menu(1) %>
    $ExportContent
    <% control Menu(2) %>
    $ExportContent
    <% end_control %>
    <% end_control %>

    Thanks

  • servalman
    Avatar
    Community Member
    211 Posts

    Re: SILVERSTRIPE BOOK XML SITE TREE ISSUE Link to this post

    Hi

    Thanks for the anwsers about languages

    Yes the fields are translated in the different language using the cms

    The tabs label are not so I was thinking that with some if statement and knowing the language with getcurrent I could change them in the template.

    I will reread the translation pages and get back to you

    Thanks

  • banal
    Avatar
    Community Member
    901 Posts

    Re: SILVERSTRIPE BOOK XML SITE TREE ISSUE Link to this post

    Did you create a template like this for ExportPage.ss:

    <node id="$ID" label="$Title" isBranch="true" classname="$ClassName"></node>
    <% control Children %>
    $ExportContent
    <% end_control %>

    Since that exports all children as well, there should be no need to export further levels in the Page_export.ss template. Maybe you need another ?flush=1 ?

  • servalman
    Avatar
    Community Member
    211 Posts

    Re: SILVERSTRIPE BOOK XML SITE TREE ISSUE Link to this post

    Hello Again

    yes it gives me all the nodes (pages) but evrything is at the same level (i get a flat tree):

    <node id="37" label="level 1" classname="EditorialPage3"></node>

    <node id="38" label="level 2" classname="Page"></node>

    <node id="39" label="level 3" classname="Page"></node>

    etc..

    to use it as an xml file with flash I need the structure to show the parent and children node :

    (I of course may be wrong in my flash approach)

    <node>
    <node id="24" label="LEVEL 1" isBranch="true" classname="Page">
    </node>
    ?
    <node id="31" label="LEVEL 1" isBranch="false" classname="RedirectorPage">
    <node id="36" label="LEVEL 2" isBranch="true" classname="EditorialPage3">
    </node>
    <node id="37" label="LEVEL 2" isBranch="true" classname="EditorialPage3">
    </node>
    <node id="38" label="LEVEL 2" isBranch="true" classname="Page">
    </node>
    <node id="39" label="LEVEL 2" isBranch="true" classname="Page">
    </node>
    <node id="40" label="LEVEL 2" isBranch="true" classname="EditorialPage2">
    </node>
    </node>

    Thanks

  • banal
    Avatar
    Community Member
    901 Posts

    Re: SILVERSTRIPE BOOK XML SITE TREE ISSUE Link to this post

    Ok I didn't know that. I thought you just want a flat output.
    It's easy to output the tree-structure though:

    <node id="$ID" label="$Title" isBranch="true" classname="$ClassName">
       <% control Children %>
       $ExportContent
       <% end_control %>
    </node>

    3232 Views
Page: 1 2 3 4 5
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.