Jump to content

How do I load a template directly into a page


Recommended Posts

Posted

I have created a module called FlightBoards.php and a template called flight_boards.php. I have managed to set it so that a link appears on my page and when clicked, it takes you to the FlightBoards page that displays flight_boards.php content.

What I want to do is to get rid of the link and just have the flight_boards.php content show directly in the page without needing to click on a link. So far, the code I've used to create the link is:

http://<a href="<?php echo url('/FlightBoards'); ?>">Flightboards</a>

My question - what would be the code needed to call the content directly into the page without needing a link?

Thanks

  • Members
Posted

sorry my bad it should be

<?php
Template::Show('nameoftemplate.php');
?>

or if you have an echo statement in your function then it should be

<?php nameofmodule::nameoffunction(); ?>

like in the news module of simpilot

quote from github

Where you want to call the PopUpNews List in your site use ->

<?php PopUpNews::PopUpNewsList(5); ?>

Posted

sorry my bad it should be

<?php
Template::Show('nameoftemplate.php');
?>

@Vangelis - That worked almost perfectly, just the styling is messed up now but I suspect that is the difference between my skin styling and phpvms styling.

Does anyone know where the style sheets are for phpvms that control tables widths etc?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...