Change homepage name

Change homepage name, a forum discussion on Jojo CMS. Join us for more discussions on Change homepage name on our Installation forum.

Back to Forum Index : Back to Installation   RSS
milenia

9 Jun 2010
Posts: 2

Hi,

I have a flash homepage set to index.htm but for functionality I wanted a CMS, can the homepage for Jojo be changed from index.php to something else easily? I've adjusted the .htaccess file so the user is set to the index.htm but if I try to divert to index.php for the cms via a link it displays a no page found error so ideally I need to change the name from index.php to something else. I;ve tried looking in the admin settings pages but can't spot anything.

Help is much appreciated...

Thanks

Paul H
Rick Rick

10 Jun 2010
Posts: 336

You can change your .htaccess file back to the way it was.

The easiest way... simply wrap everything in your template.tpl file inside an

{if $pageid==1}
{include file="homepage.tpl"}
{else}
<!-- normal template here -->
{/if}


Then create a new template called homepage.tpl and put your special homepage in there.

If you really wanted to use a separate index.htm file in your web root, look into the Apache httpd.conf "DirectoryIndex" setting. Set index.htm as higher priority to index.php and Jojo will let it display.
milenia

11 Jun 2010
Posts: 2

Hi,

I've tried the DirectoryIndex way yesterday and the original index.htm opens no problem, but my link to the forum/cms at index.php diverts to the index.htm as well.

In my .htaccess file I've put DirectoryIndex Index.htm

Is this the bit of code I need?

AllowOverride Indexes

I'll also have a look at the .tpl way. What do you need to put in the homepage.tpl?

Thanks

Paul H

Rick Rick

11 Jun 2010
Posts: 336

The template way would be the best way to do it.

Inside your homepage.tpl file should go everything that is unique to the homepage content. So for example, your files might be like this...

template.tpl
<html>
{include file="head.tpl"}
<body>
{if $pg_link == 'jojo_plugin_index'}
{include file="homepage.tpl"}
{else}
<!-- All your normal template html goes here -->
<div id="header"></div>
<div id="sidebar"></div>
<div id="content>Welcome...</div>
{/if}
{include "foot.tpl"}


And then homepage.tpl can be something like

<p>This content will only show up on the homepage</p>


You don't need to use a separate file for the homepage stuff, but it will keep your regular template.tpl file a lot cleaner. You could even shift round the body tags to inside the if statements and homepage template so that you can put a swfobject line in the head section for the homepage.

All this does is check if you're loading the homepage (by checking the page link against Jojo's index plugin) and loads the homepage template, otherwise loads the regular template for all the other pages.
Back to Forum Index : Back to Installation   RSS
You must be logged in to post a reply



You need to Register or Log In before posting on these forums.