17488 Posts in 4473 Topics by 1978 members
Page: 1 2
|Go to End||Next >|
10 December 2008 at 10:35am
i ran across a problem. here is my situation.
On the homepage im displaying 5 children pages.
now what i want is that the title of these children pages will redirect to another page on the site.
<a href="$link">$Title</a> <!-- This will redirect to another page on the site-->
$content <!-- this is the content of the active page atm-->
does this make any sense??
10 December 2008 at 3:53pm
I'm a little confused.
You just want to link to each child page? Why can't you just put that code in your control in your template?
How are you currently listing the 5 child pages? Are you using a custom php function like in the tutorials, or are you using a regular <% control Children %>?
10 December 2008 at 7:23pm
Ill try to make it a bit more clear.
My homepage contains a <%control childrenof(page) %> which has 5 children. These 5 children are listed . What i want is that each $title of these 5 children will be a link, which will point to another 5 children of another sibling.
child 1 of page 1
child 2 of page 1
child 3 of page 1
child 1 of page 2
child 2 of page 2
child 3 of page 2
So basically i want the $title of "child of page 1" to link to "child 1 of page 2", "child 2 of page 2" linking with "child 2 of page 2" etc.
Is it more clear now??
10 December 2008 at 11:42pm
<% control Children %>
<% end_control %>
11 December 2008 at 12:33am
hi SImoX. the problem with that code is that it controls the children of page 1.
i know its a bit complicated so let me try again.
page home shows the items of page 1Ã‚Â <%control childrenof(page1) %>
now what i want is that the title of the posts that get listed from the children of page1 become the links to the children of another page on the site, page2.
11 December 2008 at 3:31am Last edited: 11 December 2008 3:34am
do you have very many posts listed with <%control childrenof(page1) %> ???
you could use
<li><a href="<% if Title = page1child1 %><% control Page(page2child1) %>$Link<% end_control %><% end_if %><% if Title = page1child2 %><% control Page(page2child2) %>$Link<% end_control %><% end_if %><% if Title = page1child3 %><% control Page(page2child3) %>$Link<% end_control %><% end_if %>">$Title</a></li>
Its very hard coded but for 5 children Link to other 5 children you could use such a code.
11 December 2008 at 4:28am
they are not that many (round 5 or 6 eventually).
your method sounds good for now. Though if anyone can think of an automatic way of doing this im all ears.
11 December 2008 at 4:57am
i will think about it! the automatic way is just my favourit way too ;)
Page: 1 2
|Go to Top||Next >|