21489 Posts in 5783 Topics by 2622 members
| Go to End | Next > | |
| Author | Topic: | 2713 Views |
-
Re: SILVERSTRIPE BOOK XML SITE TREE ISSUE

24 August 2010 at 9:09pm
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
-
Re: SILVERSTRIPE BOOK XML SITE TREE ISSUE

24 August 2010 at 9:17pm
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?
-
Re: SILVERSTRIPE BOOK XML SITE TREE ISSUE

24 August 2010 at 9:20pm
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
-
Re: SILVERSTRIPE BOOK XML SITE TREE ISSUE

24 August 2010 at 9:27pm
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
-
Re: SILVERSTRIPE BOOK XML SITE TREE ISSUE

24 August 2010 at 9:37pm
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
-
Re: SILVERSTRIPE BOOK XML SITE TREE ISSUE

24 August 2010 at 10:32pm
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 ?
-
Re: SILVERSTRIPE BOOK XML SITE TREE ISSUE

24 August 2010 at 10:46pm
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
-
Re: SILVERSTRIPE BOOK XML SITE TREE ISSUE

24 August 2010 at 11:00pm
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>
| 2713 Views | ||
| Go to Top | Next > |


