Welcome Guest, Not a member yet? Register   Sign In
Hi all, another url problem
#1

[eluser]ppwalks[/eluser]
Hi all,

i'm having a bit of trouble finding an answer to this question, I have searched all the forums on this and still no-one has answered this question.

How do you assign a parent url in the url structure i.e

http://www.site.com/parent/child

I currently have my queries set up to find an article based upon the url_slug and with the pages/posts table I have a parent id to assign any pages as a sub-page but as a access them the browser only shows one level deep, do I set up the query to identify if has parent first and pass the args to the controller or is their an easier way without having to write more complex db queries.

Thanks all

Paul
#2

[eluser]ppwalks[/eluser]
Never mind fixed the problem and it was relatively easy to be honest, I used the URL SEGMENTS to get the url sent from the generated menu and I simple run the search through the last segments to retrieve the current page so this would make it flexible for any level of url index.

Get the segment array then use the php function "end" to get the last value, very easy.....




Theme © iAndrew 2016 - Forum software by © MyBB