I found this documentation: http://ellislab.com/expressionengine/user-guide/development/usage/uri.html which is quite nice, but with this code
$product_id = $this->EE->uri->segment(3, 0);I can only READ the value. How can I SET them?
How do I set (and overwrite the not-yet-existent) URL segement values of my start page (where all segments are empty)? I need to set them for all forthcoming templates.
Why do I want this? Of course I can write code like this in my templates:
{if segment_1 = "" OR segment_1 = "value_1"}...{/if}But you get quite bored if you have to do this for many links…
Thanx a lot. That’s what I was searching for!
Code looks like this (if anyone’s interested) and works perfectly.
// predifine segments!!!
if ($this->EE->uri->segment(1) == '' AND
$this->EE->uri->segment(2) == '' AND
$this->EE->uri->segment(3) == '') {
$this->EE->uri->segments = array("1" => 'graphics',"2" => 'de', "3" => 'designer');
}Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.