grashoper has asked for the wisdom of the Perl Monks concerning the following question:
I think but am not sure that this is actually looping through my xml files and assigning the images to the tabs I need to add a name attribute to those image tags, It doesn't matter if its 1 2, 3 etc, I just need the name assigned so I can reference it directly.my $str = "<header>"; if ((!$Request->item("ResourceID")->item() && !$Request->item("n +oHeader")->item()) || !$Session->{'isAuthenticated'}) { $str .= "<logo url=\"http://".$Request->ServerVariables("SERVE +R_NAME")->item()."\" width=\"200\" height=\"62\" alt=\"http://".$Requ +est->ServerVariables("SERVER_NAME")->item()."\">Images/MLXhelp_logo.p +ng</logo> if($Session->{'isAuthenticated'}) { my $current = "Help"; if ($Request->item("Tab")->item()){$current = $Request->it +em("Tab")->item();} $str .= "<tabs>"; $str .= "<current>$current</current>"; $str .= "<tab id=\"Main\" tab=\"\" view=\"\" title=\"Main\ +" height=\"28\" width=\"86\" alt=\"Click here to return to the Main P +age\"/>"; $str .= xmlFileData("Base/optionalTabs", "help2.xml", "hea +der()") if ( $Request->ServerVariables("SERVER_NAME")->item() =~ /mlx +help/i ); $str .= xmlFileData("Base/optionalTabs", "help2.xml", "hea +der()") if ( $Request->ServerVariables("SERVER_NAME")->item() =~ /tem +pohelp/i ); $str .= xmlFileData("Base/optionalTabs", "support-new.xml" +, "header()"); if ($Request->item("Tab")->item() && $str =~ /(.*?<tab id= +\"$current\".*?>).*?(<\/tab>.*)/s) { $str = $1.$2; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Add an element id
by thezip (Vicar) on Oct 26, 2007 at 20:21 UTC | |
by grashoper (Monk) on Oct 26, 2007 at 20:53 UTC | |
|
Re: Add an element id
by thezip (Vicar) on Oct 26, 2007 at 19:56 UTC | |
by grashoper (Monk) on Oct 26, 2007 at 20:07 UTC | |
|
Re: Add an element id
by holli (Abbot) on Oct 26, 2007 at 20:13 UTC |