I have an article management module in my codeigniter application. The heirarchy goes like this
primary->secondary->tertiary->article list->article
Now i have a tree view which will expand based on the above given heirarchy. In the tree view if a user clicks on a secondary category i would show them all the list of articles under that secondary category irrespective of tertiary category. In the same way if some one clicks primary category im showing a list of articles under that primary irresepective of secondary and tertiray. The current approach im following is
<a href="/articles/show_primary/primary_name">Primary Name</a>
<a href="/articles/show_secondary/secondary_name">PSecondary Name</a>
<a href="/articles/show_tertiary/tertiary_name">Tertiary Name</a>
From an seo perspective the identifier show_primary, showsecondary in the uRLs are just noise.
So id like to know if there is some easy way thtat i can adopt to clean up the urls and make them look like
> <a href="/articles/primary_name (or) secondary_name (or)
> tertiary_name">type name</a>
and identify the correct category in the business logic.
P.S I know that i can look into all the tables and find the best match and use it, but im looking for an even easier method if one exist.
I’d setup a custom route. Maybe something like this?