Page 1 of 1
Link to parent page?
Posted: Mon Jul 17, 2006 2:25 pm
by hansom
I want to have a link to the current page's parent page in my template. At first I thought I could use the cms_selflink tag and use the dir parameter, but it only supports links to the start, next or previous page. So, is there a way to generate a parent/up link or do I have to create the functionality myself? Would modifying the cms_selflink tag be a good/correct way of doing this?
Re: Link to parent page?
Posted: Mon Jul 17, 2006 2:38 pm
by calguy1000
Yes, I think cms_selflink is the proper place for this, and if it doesn't exist already you'll have to add it.
Maybe adding the option for "dir=parent" would be the best way.
Re: Link to parent page?
Posted: Mon Jul 17, 2006 7:26 pm
by hansom
OK, I modified function.cms_selflink.php. It now accepts up as value for the dir parameter. Not sure if my solution is optimal but it seems to work just fine. Is this something that I should submit somewhere and make available?
Re: Link to parent page?
Posted: Tue Jul 18, 2006 6:54 pm
by tsw
hansom wrote:
Is this something that I should submit somewhere and make available?
Please do, you can register in the forge (
http://dev.cmsmadesimple.org/) and submit as a patch against current svn if you can.
Re: Link to parent page?
Posted: Fri Jul 21, 2006 1:05 pm
by hansom
tsw wrote:
hansom wrote:
Is this something that I should submit somewhere and make available?
Please do, you can register in the forge (
http://dev.cmsmadesimple.org/) and submit as a patch against current svn if you can.
I'd be happy to, but I'm afraid you'll have to explain to me exactly how I do this. Sorry...
Re: Link to parent page?
Posted: Fri Jul 21, 2006 5:04 pm
by tsw
hansom wrote:
I'd be happy to, but I'm afraid you'll have to explain to me exactly how I do this. Sorry...
best practice is to get svn client (for linux search for subversion in your package manager) and for windows people say that tortoise svn is good
(
http://dev.cmsmadesimple.org/docman/vie ... isesvn.htm) after installed you checkout the project, do your changes and say svn diff > patch_against_.patch (not sure how to do it in windows, sorry)
then you can create account in the forge
http://dev.cmsmadesimple.org/account/register.php and go to core tracker patches portion and submit your well tested and documented patch file created with svn.
hope this helps