solved Custom Index Page

SoftDesigns
SoftDesigns
@softdesigns
7 years ago
242 posts
Can we create a custom page, and have it replace or route from the default site index page?
--
We do not want delete the current index page, just hide or override it, and use our custom page instead.
Prefer try NOT using a custom template (tpl) file, instead we actually want to try using the built in custom pages of JR platform. Not sure if this is possible?
--
We want to ensure that any custom pages we create, do not get wiped out after new version Ninja updates.

updated by @softdesigns: 06/08/17 09:24:18PM
michael
@michael
7 years ago
7,714 posts
Not really understanding the reason you want to do it, but you can use {jrCore_location('http://somewhere.com')}
{if $somthing}
{jrCore_location('http://somewhere.com')}
{/if}
in a template.

--edit--
OR, you might be able to use a listener to pick up on the url and put your page there via a custom module INSTEAD of the index.tpl if thats whats desired.

There are a ton of events to listen for, so pick one or a couple that work and that could be a way to do it too if you wanted it on the same url as the index. site.com/
updated by @michael: 03/10/17 12:17:05PM
SoftDesigns
SoftDesigns
@softdesigns
7 years ago
242 posts
For starters we added code above with no "IF" login - just a simple: jrCore_location
This route code was added at the top of index.tpl
Directly above this code: {jrCore_include template="header.tpl"}
Then saved and activated the custom index.tpl
--
When we goto home page, still no redirect, no custom route, just stays on default site index page. So this simple location redirect code not working.
--
Any Ideas?
updated by @softdesigns: 03/10/17 01:05:02PM
michael
@michael
7 years ago
7,714 posts
working for me.

In jrElastic2 index.tpl if i add that to the top of it, i get redirected here

{jrCore_location('https://jamroom.net')}
{* /////////// DO NOT REMOVE //////////  *}
{assign var="page_template" value="index"}
{* /////////// DO NOT REMOVE //////////  *}

{jrCore_include template="header.tpl"}
{jrCore_include template="index_top.tpl"}
{jrCore_include template="index_core.tpl"}
{jrCore_include template="index_audio.tpl"}
{jrCore_include template="index_video.tpl"}
{jrCore_include template="index_events.tpl"}
{jrCore_include template="index_gallery.tpl"}
{jrCore_include template="footer.tpl"}
Suspect you're not editing where you think you're editing. Or have not reset the caches.

put something in where you're planning on using the redirect and make sure it comes out. THIS IS WHERE I AM EDITING HERE !!!!!!!!!

See it come out on the page, then replace it with that redirect.
SoftDesigns
SoftDesigns
@softdesigns
7 years ago
242 posts
So strange - we added your exact code to: jrNinja/index.tpl (custom)
{jrCore_location('https://jamroom.net')}
{* 2017.03.10-15:42-CT: Hide Index Page: Route to custom page *}
TEST123
Refreshed and reset cache, and activated custom template.
The "TEST123" does not show, and the location route does not execute.
--
Is this the default Home / Index page of Ninja skin: jrNinja/index.tpl (custom) ?
updated by @softdesigns: 03/10/17 02:17:18PM
michael
@michael
7 years ago
7,714 posts
thats not strange, its Site Builder.

You have a Site Builder page active for the index.tpl location that is being used instead of the .tpl file.

go to
yoursite.com -> SITE BUILDER -> DELETE PAGE

And your index.tpl file will be used instead of the Site Builder page.

Alternatively you could add a TEMPLATE CODE widget to that page to put whatever template code you wanted into the existing page.
SoftDesigns
SoftDesigns
@softdesigns
7 years ago
242 posts
@michael : Yes, you are right, as usual :)
After going deeper into Site Builder, it may cover most of our custom page needs.
--
Let's close this thread, study Site Builder, and we may open future thread more specific to Site Builder
--
Great Support - Solved...

Tags