General
Getting & Giving Support
Administration
Design
- Tut. - Layouts and Themes
- Tut. - Navigation cookbook
- Tut. - How To section
Reference Material
Plugin Development
- Tut. - Writing a plugin
- Ref. - List of Events
- Ref. - Enabling cron jobs
- Ref. - PHPDoc
Core Development
- Ref. - PHPDoc
Press information
Wolf CMS books section
url()
The url() function gives access to the URL of the current page. It does not take any parameters. If, for example, the current page was the “Articles” page, then
<?php echo $this->url(); ?>
returns the value:
http://mywolfsite.com/articles
See also: urlById()
Usage notes
URLs of pages that are not current
To return the URL of a page that is not current, use the find function. This code:
<?php echo $this->find('articles')->url(); ?>
returns http://mywolfsite.com/articles from anywhere in the site.
Creating links
Although url() can of course be used for creating links, there is a specialized function that is normally the preferred way of doing this: see the documentation on the link() function.
