solved Creating a Page

pch
@pch
9 years ago
328 posts
Hello,

I am not using the site builder. I've used the page creator, it works fine but I don't like the way the url looks like (mysite.com/page/1/live).

I would like to create a page for the main site with an url that will look like: mysite.com/live

1) How to create such a page using a template file that will have the same look (design) like the entire page? Which template file should i copy from?

2) How to add meta tags (title, keyword, description, og:image, og:description etc) to the page created manually? Will i be able to add them through the Meta tag Creator?

3) Is there an easy way to translate the entire content (text) of the page (/live) created manually? or should i have to duplicate that page into several languages (e. g. /live, /en-direct etc)?

4) Will it be able to translate meta tag?

5) The page /Live will have some links on it (a kind of menu) to pages like /android, /ios, /pc, /mac etc.

How to get the site structure look like:

mysite.com/live/android
mysite.com/live/ios
mysite.com/live/pc
mysite.com/live/mac

Instead of:

mysite.com/android
mysite.com/ios
mysite.com/pc
mysite.com/mac

Thanks
updated by @pch: 09/24/16 05:39:27PM
brian
@brian
9 years ago
10,149 posts
1) copy the skins/active_skin/index.tpl to "live.tpl" and modify it to suit your needs. You will want to leave the includes in for the header/footer.

2) Meta Tag manager will work for it

3) You can have the languages in the template - i.e.
{if $_user.user_language == 'en-US'}
   ... show your english content ...
{elseif $_user.user_language == 'es-ES'}
    ... show spanish ...
{* add more elseif to suit your needs *}
{/if}

4) No - you will have to do something custom for that

5) you really can't do this easily - not without making "live" a module. Sorry!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
michael
@michael
9 years ago
7,816 posts
pch:.....How to get the site structure look like:
mysite.com/live/android
mysite.com/live/ios
mysite.com/live/pc
mysite.com/live/mac
Instead of:
mysite.com/android
mysite.com/ios
mysite.com/pc
mysite.com/mac
Thanks

Site builder will happily handle urls like this. If you go to
your-site.com/live and there is nothing there you will be asked if you would like to build a page there.

If you then go to
your-site.com/live/pc and there is nothing there you will be asked if you would like to build a page there.
pch
@pch
9 years ago
328 posts
brian:
1) copy the skins/active_skin/index.tpl to "live.tpl" and modify it to suit your needs. You will want to leave the includes in for the header/footer.
2) Meta Tag manager will work for it
3) You can have the languages in the template - i.e.
{if $_user.user_language == 'en-US'}
   ... show your english content ...
{elseif $_user.user_language == 'es-ES'}
    ... show spanish ...
{* add more elseif to suit your needs *}
{/if}
4) No - you will have to do something custom for that
5) you really can't do this easily - not without making "live" a module. Sorry!

Hi Brian,

Thanks for your reply.

1) Ok

2) Ok

3) Instead of the code you posted (the if statement), what about if I create some language strings and use the {JrCore_lang} fonction? Isn't it going to work?

I am asking because I have 4 languages on the site. Using the "if statement" I may end up having a very long and heavy website page since the text I am planning to put on that page is too long and contains images. Isn't it going to increase the page weight? Please advise.

4) Any clue on the custom code that can be used to translate the meta tag?

Can the "if statement" handle it?

e.g.:

{if $_user.user_language == 'en-US'}
Meta tags in english here
{elseif $_user.user_language == 'es-ES'}
Meta tags in spanish here
{elseif $_user.user_language == 'fr-FR'}
Meta tags in french here
{/if}

5) Well, How to make a page a module? Will it still act like a page?

Thanks
michael
@michael
9 years ago
7,816 posts
pch:.... 5) Well, How to make a page a module? Will it still act like a page?

Docs: "The Module System"
https://www.jamroom.net/the-jamroom-network/documentation/getting-started/899/the-module-system
pch
@pch
9 years ago
328 posts
Hi Brian,

What do you say about my reply above?

Thanks
brian
@brian
9 years ago
10,149 posts
pch:
Hi Brian,
What do you say about my reply above?
Thanks

Yes - you can use if statements in your templates to show different tags, etc - that's how you'd want to do it.


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net

Tags