The following warnings occurred: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Warning [2] Undefined array key "allowautourl" - Line: 584 - File: inc/class_parser.php PHP 8.1.31 (Linux)
|
Name of the page - Printable Version +- GetSimple Support Forum (http://get-simple.info/forums) +-- Forum: GetSimple (http://get-simple.info/forums/forumdisplay.php?fid=3) +--- Forum: General Questions and Problems (http://get-simple.info/forums/forumdisplay.php?fid=16) +--- Thread: Name of the page (/showthread.php?tid=2661) |
Name of the page - Bak - 2012-01-27 Hi, I apologize if I'm boring, but I do not know php language... Is there a way to obtain the name of the file via php? For example: Page name: The house Real name of the file: the-house.xlm I need find the page name (without extension) for use it in a link and download a different file, for example, the-house.pdf Thankyou Name of the page - n00dles101 - 2012-01-27 In your theme files $id will return the slug name so Code: echo $id.'.php'; // the xml file Name of the page - Bak - 2012-01-27 n00dles101 Wrote:In your theme files $id will return the slug name Yes, correct...but how include this code in a page? If I manage it in a component the result is the name of the component... Name of the page - Connie - 2012-01-27 can't you use just plain links to these pages? Name of the page - Bak - 2012-01-27 Connie Wrote:can't you use just plain links to these pages? Yes, it is a way but I need to implement a routine that will be the same for every page...but in every page this routine download a different file. Thanks Name of the page - Carlos - 2012-01-27 @Bak In your template or component: Code: <?php get_page_slug(); ?>.pdf Code: <?php echo return_page_slug(),'.pdf'; ?> Full list of GetSimple template tags: http://get-simple.info/wiki/themes:template_tags Name of the page - Bak - 2012-01-28 Carlos Wrote:@Bak Thankyou so much....perfect! |