NamelessMC

Internet Explorer

Internet Explorer is not supported. Please upgrade to a more modern browser.

Is <a href="test.tpl"> possible?
Started by CornHubReligion

CornHubReligion

CornHubReligion

Member
Joined
14 Nov 2022
Last Seen
23 Jan 2023
Topics
1
Posts
3

Hello everyone,

 

I am currently working on something and I would like to know if it is possible to link to other tpl file using html like above. If no, is there any alternative to that.

 

Thank you for reading and have a good day!

CornHubReligion · about 1 year ago · Last edited: about 1 year ago
Samerton

Samerton

Owner
Joined
30 Mar 2015
Last Seen
24 Nov 2024
Topics
41
Posts
1076

Hi,

It's not possible to link directly to a .tpl file.

Each .tpl file (usually) relates to a full page within the system, for example index.tpl is for the homepage, forum/view_topic.tpl is for viewing topics etc.

You need to link to the full page instead of the .tpl file, for example for the homepage.

May I ask what you are looking to achieve, in case there is another way to do this?

Samerton · about 1 year ago
CornHubReligion

CornHubReligion

Member
Joined
14 Nov 2022
Last Seen
23 Jan 2023
Topics
1
Posts
3

@Samerton

Hello and thank you for replying.

I am trying to link to a custom page. Is there any alternative solution?

 

CornHubReligion · about 1 year ago
Samerton

Samerton

Owner
Joined
30 Mar 2015
Last Seen
24 Nov 2024
Topics
41
Posts
1076

You should simply be able to add

text goes here

replacing /example with the link to your custom page, and text goes here with the text to display in the link.

Samerton · about 1 year ago
CornHubReligion

CornHubReligion

Member
Joined
14 Nov 2022
Last Seen
23 Jan 2023
Topics
1
Posts
3

but can i add custom html/css to that custom page?

CornHubReligion · about 1 year ago
Samerton

Samerton

Owner
Joined
30 Mar 2015
Last Seen
24 Nov 2024
Topics
41
Posts
1076

You can use the custom page editor (StaffCP -> Pages) and by clicking on the source button, you can enter HTML and CSS directly. Make sure you enable "Allow unsafe HTML" for the page when you do this.

When version 2.0.3 becomes available, there will be improvements to this feature to make sure none of your custom HTML gets removed by the editor.

Samerton · about 1 year ago