Get Page Slug - Printable Version +- GetSimple Support Forum (http://get-simple.info/forums) +-- Forum: GetSimple (http://get-simple.info/forums/forumdisplay.php?fid=3) +--- Forum: Developer Discussions (http://get-simple.info/forums/forumdisplay.php?fid=8) +--- Thread: Get Page Slug (/showthread.php?tid=1503) |
Get Page Slug - Staurvik - 2011-04-01 Hi! I want a gallery-script to fetch the page-slug in order to find a coresponding folder. I'm quite noive at php-programming, so I'm sure it's an obvious solution. However; this is where I need to get the page slug: Code: $images_dir = 'data/uploads/images/PAGE SLUG HERE/'; So, how do I fix this? Thanks in advance! Get Page Slug - n00dles101 - 2011-04-01 Just use Code: $images_dir = 'data/uploads/images/'.get_page_slug(FALSE).'/'; edit: fixed code Get Page Slug - Staurvik - 2011-04-01 Yhea, I've tried that, it only breaks the site. Maybe got something to do with other parts of the script. Code: <?php Get Page Slug - n00dles101 - 2011-04-01 Sorry it should be Code: $images_dir = 'data/uploads/images/'.get_page_slug(FALSE).'/'; Get Page Slug - Staurvik - 2011-04-01 Perfect Thanks very much! |