Topic: Name of the page

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

Re: Name of the page

In your theme files $id will return the slug name

so

echo $id.'.php'; // the xml file
echo $id.'.pdf'; // a pdf file of the same name. 
Coming Soon - Schema manager....

Re: Name of the page

n00dles101 wrote:

In your theme files $id will return the slug name

so

echo $id.'.php'; // the xml file
echo $id.'.pdf'; // a pdf file of the same 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...

Re: Name of the page

can't you use just plain links to these pages?

|--
Die deutsche GetSimple-Webseite: http://www.Get-Simple.de = the german Get-Simple-Website!
Das deutschsprachige GetSimple-(Unter-)Forum:   http://get-simple.info/forum/forum/16/german-deutsch/

Re: Name of the page

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

Re: Name of the page

@Bak

In your template or component:

<?php get_page_slug(); ?>.pdf

or:

<?php echo return_page_slug(),'.pdf'; ?>

Full list of GetSimple template tags: http://get-simple.info/wiki/themes:template_tags

Re: Name of the page

Carlos wrote:

@Bak

In your template or component:

<?php get_page_slug(); ?>.pdf

or:

<?php echo return_page_slug(),'.pdf'; ?>

Full list of GetSimple template tags: http://get-simple.info/wiki/themes:template_tags

Thankyou so much....perfect!