21293 Posts in 5733 Topics by 2602 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 624 Views |
-
Link between pages of different level

7 August 2011 at 8:41pm Last edited: 7 August 2011 8:49pm
Hello all.
I'm trying to link from a one page (nueva zona) and from the childrens of this (nuevo equipo) to another page (nuestras sedes). Both are on the same level. I also want to link to the same site (nuestras sedes) from its parent page (nuevo torneo).
The problem is i can't use template controls such as childrenOf(url) or page(url) because the user is going to be creating these pages dynamically.
It's a bit complicated to explain, better leave the image so that it can be better understand
-
Re: Link between pages of different level

7 August 2011 at 9:43pm
If you don't need to place them in the template, then the content editor can just add the links in the content of each page. Otherwise you could use something like a has_one to SiteTree, and then a TreeDropdownField to select the page you want to link to.
-
Re: Link between pages of different level

8 August 2011 at 10:58am
i doesn't need to place then in the template I just want to add the links in the content of each page, but i can't use the content of the editor they have to be created dynamically
-
Re: Link between pages of different level

8 August 2011 at 1:53pm
Solve my problem using in nuevo torneo template
<% control Children %>
<% if ClassName != NuevaZona %>
<a href="$Link">$Title</a>
<% end_if %>
<% end_control %>in nueva zona
<% control Parent %>
<% control Children %>
<% if ClassName != NuevaZona %>
<a href="$Link">$Title</a>
<% end_if %>
<% end_control %>
<% end_control %>and in nuevo equipo
<% control Parent %>
<% control Parent %>
<% control Children %>
<% if ClassName != NuevaZona %>
<a href="$Link">$Title</a>
<% end_if %>
<% end_control %>
<% end_control %>
<% end_control %>I'm not sure if this is the best way but it worked
| 624 Views | ||
|
Page:
1
|
Go to Top |

