Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Template Questions

Permalinks - Modifying Url's


Reply

2 Posts   1065 Views

Avatar
edenview

29 May 2010 at 7:10am Community Member, 13 Posts

Hi there,

I am trying to change each page to point to a permanent link.

For example:

Clicking on Sport link takes me to www.edenviewphotography.com.au/Sport/

I would like it to take me to www.edenview photography.com.au/Sport/#num=content-309&id=album-8

This way people only have to download x1 file instead of multiple swf files.

If you know how I can modify the links please let me know.

Avatar
joshy

29 May 2010 at 11:48am Community Member, 57 Posts

How is that link generated?

You'll could add a db field for 'RealLink':

class MyPage extends Page {
static $db = array('RealLink' => 'Varchar(255)');
}

...and then override Link() to go append it:

class MyPage extends Page {
static $db = array('RealLink' => 'Varchar(255)');
function Link()
{
return $this->Link.'/'.$this->RealLink;
}
}

In the template you could then just continue using $Link to output it.