I read the Sticky on custom page links, but the topic was locked before I could completely figure out my problem. I'm trying to add several custom pages to my site. From what I understand, the name of the link is what gets _link appended to it-- but not always. Default site pages that CAN be customized (but are not technically "custom pages" in the sense that you created them from scratch) do not have 'link' in their {variable}. Have I got that right, or are there some special exceptions to when _link is appended and when it is not? I have yet to see _link appended to anything on the Custom Pages menu in the name column, but I know the {characterlist_link} variable works on other pages, using that "name."
Also, I thought that using whatever was on the Custom Page's name field in a {variable} automatically made it a link, but in trying to make a sitemap, all of my {variables} (for example {characterlist_link}) show up just like that-- as a word in curly brackets.
Link: http://drfa.seventh-star.net/viewpage.php?page=sitemap
Checked FAQs: I don't think there are any for 3.1 yet...
Search Terms: custom pages, links, link variables
I tried turning TinyMCE off, but that didn't help. Am I misunderstanding how custom pages and their links work?
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
Probably.
When I create new custom pages, the {variable} ends up being whatever the name is plus _link. So for my custom page I created for my prefects page:
Name: prefects
Title: Prefects
The {variable} I use on my skins to create the actual link would be {prefects_link}.
On the custom page edit:
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. The title will be the title of the page. 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.
Note: The name for your page should contain letters, numbers, and the underscore character ONLY.
With Page Links, not custom pages, it comes out as whatever the name is. So for
Name: random
Text of Link: Random
The variable i use on my skins to make this link is {random}.
The custom pages that were created when the site was created/upgraded, have whatever name they have, with or without _link added on to the end. It's only the custom pages that YOU add, that you have to follow the _link as a default.
To find out what the {variable} is for every custom page or pagelinks, just go to the Pagelinks /admin.php?action=links and click on edit next to a pagelink to see what its name is. The
Name: _________
is what it is. So for Name: home it's {home}
for Name: promote_link it's {promote_link}.
Whoever said nothing is impossible never tried slamming a revolving door.
url: https://www.potionsandsnitches.org/fanfiction
php: 7.4.33 msql: 5.6.51-community GPL
efic version: 3.5.5 latest patches: yes
bridges: none mods: challenges, tracker, story end, beta, word
When you create a custom page through the "Custom Page" admin panel, you get the variable {NAME_link} because the panel will automatically add a new "Page Link". If the page was one that already in the "Page Links" list or one you add through that panel it will be whatever you name the link via the "Page Link" admin panel.
I double-checked the link names for the variables I want to use in my sitemap, but they're all correct-- so why is it on my custom sitemap page, all the would-be links are just words in curly brackets? I've seen the variables at work in other parts of the site (within TinyMCE boxes), so why can't I use those variables here? Am I getting something wrong?
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
The custom page feature does not allow you to use template variables inside your custom page. The only thing the custom page will print out is straight HTML. You have to build the links yourself.
Ah, okay, that's what I was wondering-- the text for creating the custom page had me thinking that the name would be a variable for use across the site, but it seems it only works in *.tpl skin files and the like? That makes sense. Now I just have to find all the links across the site...
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