[Wiki]Adding Custom...
 
Notifications
Clear all

[Wiki]Adding Custom Pages

3 Posts
2 Users
0 Reactions
3,694 Views
(@tammy)
Posts: 2577
Member Moderator
Topic starter
 

To add a custom page in 3.0 it is much simpler than in 1.1 and 2.0 as you can now do this through
an admin panel.

1.  Goto Admin -> Custom Pages

2.  Click on "Add New Custom Page"

3.  Enter the name of the page in the form.  Note: The name for your page should contain letters, numbers, and the underscore character ONLY.

4.  Enter the title for the page.  The page title will also be the text of the link to the page in the page links.

5.  Enter the text of your page. 

6.  Click the "Submit" button.

The name you assign to your custom page will be the {NAME_link} variable for you to use in your skins. The script will append "_link" to the name to help prevent naming conflicts with other variables.  For the URL of your custom page, you may use either viewpage.php?id=ID or viewpage.php?page=NAME where ID is the ID number of the page or NAME is the name of the page.

Names are case sensitive!  A page of Name is not the same page as name.

So for example, if you added a page for a site map with the following information:

Name: sitemap
Title: Site Map
Text:
This is the site map for the test site.

The link variable would be {sitemap_link}.  The text of that link would be "Site Map" and you would access the page with viewpage.php?page=sitemap.  To change the link text, you will need to edit the link through the Page Links admin panel in Admin -> Page Links.

Your new page will also appear as an option in the admin page for the menu block.  To add the page manually to the menu block in a variable.php file you would use "sitemap" in the content area. Such as:

$blocks["footermenu"] = array(
"title" => "",
"status" => "1",
"file" => "menu/menu.php",
"style" => 0,
"content" => array (
0 => 'help',
1 => 'rules',
2 => 'contactus',
3 => 'sitemap_link'
)
);


 
Posted : 15/07/2006 1:54 pm
(@azurite)
Posts: 209
Reputable Member
 

Is there a special way of adding links of custom pages to the footer menu (in CSSZen, as I don't see the footer menu in any of the other default skins)? I wanted to add a link to the terms of service/service terms, so I used the same format you showed above-- and I used 'tos_link' in the variables file, as seen here:

$blocks["footermenu"] = array(
"title" => "",
"status" => "1",
"file" => "menu/menu.php",
"style" => 0,
"content" => array (
0 => 'help',
1 => 'rules',
2 => 'tos_link',
3 => 'contactus'
)
);

But I don't see a special place for the Footer Menu in the Custom Pages/Page Links/Blocks panels, and enabling it in the Main Menu panel (even though the other footer menu links, Contact Us, Help, and Rules, are not enabled in that same menu) doesn't seem to do anything.

This is also happening for the Main Menu in Zenlike, even though I successfully managed to add another custom page link to that main menu, and the option is enabled in the Main Menu panel.

/* MENU BLOCK
The menu is set to display on all pages.
Additional styles include:
As an inline list. (style=2)
Links to home, recent, authors, categories,titles,series,search,top tens, browse by, help, contact us, and the login info. */
$blocks["menu"]["status"] = '1';
$blocks["menu"]["content"] = array (
  0 => 'home',
  1 => 'recent',
  2 => 'authors',
  3 => 'catslink',
  4 => 'titles',
  5 => 'series',
  6 => 'search',
  7 => 'tens',
  8 => 'characterlist_link',
  9 => 'browse',
  10 => 'tos_link',
  11 => 'help',
  12 => 'contactus',
  13 => 'login',
  14 => 'logout',
  15 => 'adminarea');
$blocks["menu"]["style"] = 0;

I added 'characterlist_link' and it shows up just fine on all skins, but 'tos_link' doesn't work for CSSZen and Zenlike for some reason.


Archive: Dragonfayth
eFiction: 3.5.5/6
Latest Patch(es): Yes
bridged?: No
modified?: Yes
PHP: 7.4.25
MySQL: 5.7.32-35-log

 
Posted : 07/01/2007 8:39 am
(@tammy)
Posts: 2577
Member Moderator
Topic starter
 

It's just {tos} no _link.  The {variable} will always be the name assigned to the link in the Page Links panel.


 
Posted : 07/01/2007 10:10 am
Share: