Redirect option added to pages.
This commit is contained in:
parent
7a6372b83f
commit
03f8af0961
5 changed files with 11 additions and 4 deletions
|
|
@ -62,7 +62,8 @@ INSERT INTO Product_template VALUES (1,'Default','<style>\r\n.productFeatureHead
|
|||
INSERT INTO Product_template VALUES (2,'Benefits Showcase','<style>\r\n.productOptions {\r\n font-family: Helvetica, Arial, sans-serif;\r\n font-size: 11px;\r\n}\r\n</style>\r\n\r\n^Product_Image1;\r\n<table width=\"100%\" cellpadding=\"3\" cellspacing=\"0\" border=\"0\">\r\n<tr>\r\n <td class=\"content\" valign=\"top\" width=\"66%\">^Product_Description;<p>\r\n <b>Benefits</b><br>\r\n^Product_Benefits;\r\n </td>\r\n <td valign=\"top\" width=\"34%\" class=\"productOptions\">\r\n^Product_Thumbnail2;<p>\r\n<b>Specifications</b><br>\r\n^Product_Specifications;<p>\r\n<b>Options</b><br>\r\n^Product_Accessories;<p>\r\n<b>Other Products</b><br>\r\n^Product_Related;<p>\r\n </td>\r\n</tr>\r\n</table>\r\n\r\n');
|
||||
INSERT INTO Product_template VALUES (3,'Three Columns','<style>\r\n.productFeatureHeader,.productSpecificationHeader,.productRelatedHeader,.productAccessoryHeader, .productBenefitHeader {\r\n font-weight: bold;\r\n font-size: 15px;\r\n}\r\n.productFeature,.productSpecification,.productRelated,.productAccessory, .productBenefit {\r\n font-size: 12px;\r\n}\r\n\r\n</style>\r\n^Product_Description;<p>\r\n\r\n<table width=\"100%\" cellpadding=\"3\" cellspacing=\"0\" border=\"0\">\r\n<tr>\r\n <td align=\"center\">^Product_Thumbnail1;</td>\r\n <td align=\"center\">^Product_Thumbnail2;</td>\r\n <td align=\"center\">^Product_Thumbnail3;</td>\r\n</tr>\r\n</table>\r\n<table border=\"0\" cellpadding=\"0\" cellspacing=\"5\" width=\"100%\">\r\n<tr>\r\n <td valign=\"top\" class=\"tableData\" width=\"35%\">\r\n<b>Features</b><br>^Product_Features;<p/>\r\n<b>Benefits</b><br>^Product_Benefits;<p/>\r\n</td>\r\n <td valign=\"top\" class=\"tableData\" width=\"35%\">\r\n<b>Specifications</b><br>^Product_Specifications;<p/>\r\n<b>Accessories</b><br>^Product_Accessories;<p/>\r\n<b>Related Products</b><br>^Product_Related;<p/>\r\n</td>\r\n <td class=\"tableData\" valign=\"top\" width=\"30%\">\r\n <b>Price:</b> ^Product_Price;<br>\r\n <b>Product Number:</b> ^Product_Number;<p>\r\n ^Product_Brochure;<br>\r\n ^Product_Manual;<br>\r\n ^Product_Warranty;<br>\r\n </td>\r\n</tr>\r\n</table>\r\n\r\n');
|
||||
INSERT INTO Product_template VALUES (4,'Left Column Collateral','<style>\r\n.productCollateral {\r\n font-size: 11px;\r\n}\r\n</style>\r\n<table width=\"100%\">\r\n<tr><td valign=\"top\" class=\"productCollateral\" width=\"100\">\r\n<img src=\"^Extras;spacer.gif\" width=\"100\" height=\"1\"><br>\r\n^Product_Brochure;<br>\r\n^Product_Manual;<br>\r\n^Product_Warranty;<br>\r\n<br>\r\n<div align=\"center\">\r\n^Product_Thumbnail1;<p>\r\n^Product_Thumbnail2;<p>\r\n^Product_Thumbnail3;<p>\r\n</div>\r\n</td><td valign=\"top\" class=\"content\" width=\"100%\">\r\n^Product_Description;<p>\r\n<b>Specs:</b><br>\r\n^Product_Specifications;<p>\r\n<b>Features:</b><br>\r\n^Product_Features;<p>\r\n<b>Options:</b><br>\r\n^Product_Accessories;<p>\r\n</td></tr>\r\n</table>');
|
||||
|
||||
alter table page add column redirectURL text;
|
||||
insert into international values (715,'WebGUI',1,'Redirect URL');
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -86,6 +86,8 @@ sub page {
|
|||
} elsif ($wobjectOutput ne "") {
|
||||
$contentHash{0} = $wobjectOutput;
|
||||
$content = WebGUI::Template::generate(\%contentHash,1);
|
||||
} elsif ($session{page}{redirectURL}) {
|
||||
$session{header}{redirect} = WebGUI::Session::httpRedirect($session{page}{redirectURL})
|
||||
} else {
|
||||
if (WebGUI::Privilege::canViewPage()) {
|
||||
if ($session{var}{adminOn}) {
|
||||
|
|
|
|||
|
|
@ -1306,7 +1306,7 @@ sub url {
|
|||
$subtext = shift;
|
||||
$size = shift || $session{setting}{textBoxSize} || 30;
|
||||
$output = '<script language="JavaScript">function addHTTP(element) {
|
||||
if (!element.value.match(":\/\/") && !element.value.match("\\\^") && element.value != "")
|
||||
if (!element.value.match(":\/\/") && element.value.match(/\.\w+/))
|
||||
{ element.value = "http://"+element.value}}</script>';
|
||||
$output .= '<input type="text" name="'.$name.'" value="'.$value.'" size="'.
|
||||
$size.'" maxlength="'.$maxLength.'" onBlur="addHTTP(this.form.'.$name.')" '.$extras.'>';
|
||||
|
|
|
|||
|
|
@ -71,7 +71,8 @@ sub _recursePageTree {
|
|||
synopsis,
|
||||
templateId,
|
||||
startDate,
|
||||
endDate
|
||||
endDate,
|
||||
redirectURL
|
||||
) values (
|
||||
$newPageId,
|
||||
$_[1],
|
||||
|
|
@ -93,7 +94,8 @@ sub _recursePageTree {
|
|||
".quote($package{synopsis}).",
|
||||
".quote($package{templateId}).",
|
||||
$newParent{startDate},
|
||||
$newParent{endDate}
|
||||
$newParent{endDate},
|
||||
$newParent{redirectURL}
|
||||
)");
|
||||
_recursePageTree($package{pageId},$newPageId);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -171,6 +171,7 @@ sub www_editPage {
|
|||
$f->text("title",WebGUI::International::get(99),$page{title});
|
||||
$f->text("menuTitle",WebGUI::International::get(411),$page{menuTitle});
|
||||
$f->text("urlizedTitle",WebGUI::International::get(104),$page{urlizedTitle});
|
||||
$f->url("redirectURL",WebGUI::International::get(715),$page{redirectURL});
|
||||
$f->readOnly(WebGUI::Template::selectTemplate($page{templateId}),WebGUI::International::get(356));
|
||||
$f->textarea("synopsis",WebGUI::International::get(412),$page{synopsis});
|
||||
$f->textarea("metaTags",WebGUI::International::get(100),$page{metaTags});
|
||||
|
|
@ -242,6 +243,7 @@ sub www_editPageSave {
|
|||
endDate=$session{form}{endDate},
|
||||
metaTags=".quote($session{form}{metaTags}).",
|
||||
urlizedTitle='$session{form}{urlizedTitle}',
|
||||
redirectURL='$session{form}{redirectURL}',
|
||||
defaultMetaTags='$session{form}{defaultMetaTags}',
|
||||
templateId='$session{form}{templateId}',
|
||||
menuTitle=".quote($session{form}{menuTitle}).",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue