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 · 6 days ago · Last edited: 6 days ago
Samerton

Samerton

Owner
Joined
30 Mar 2015
Last Seen
26 Jan 2023
Topics
38
Posts
968

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 · 5 days 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 · 4 days ago
Samerton

Samerton

Owner
Joined
30 Mar 2015
Last Seen
26 Jan 2023
Topics
38
Posts
968

You should simply be able to add

<a href="/example">text goes here</a>

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

Samerton · 3 days 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 · 3 days ago
Samerton

Samerton

Owner
Joined
30 Mar 2015
Last Seen
26 Jan 2023
Topics
38
Posts
968

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 · 2 days ago