Elxis CMS Forum

Support => General => Topic started by: seadhna on August 04, 2017, 13:28:35

Title: content:WHAT? for homepage?
Post by: seadhna on August 04, 2017, 13:28:35
Hi, a very basic question, what is the internal link for the frontpage of an Elxis site? content:whatgoeshere
Title: Re: content:WHAT? for homepage?
Post by: webgift on August 04, 2017, 15:37:51
content:/
Title: Re: content:WHAT? for homepage?
Post by: seadhna on August 04, 2017, 16:18:57
This isn't working for me. in an index.php for a template, I am linking the logo to the homepage, but I want this to switch to the correct language. If I <a href="content:/">logo goes here</a> in the index.php, nothing happens when I click on the logo on the frontend.
Title: Re: content:WHAT? for homepage?
Post by: datahell on August 06, 2017, 21:00:24
The Elxis URI for the frontpage is an empty string! "content:/" has the same affect in most cases but the empty string is better. Elxis URIs are not URLs! You must use the makeURL function to convert them to full URLs.

This is not a valid link:
<a href="content:/">
This is the correct link:
<a href="<?php echo $elxis->makeURL('content:/'); ?>">

And this is the proper (multilingual) link to point to your site's frontpage. Use this one.

<a href="<?php echo $elxis->makeURL(); ?>" title="<?php echo $elxis->getConfig('SITENAME'); ?>">My Frontpage</a>
Title: Re: content:WHAT? for homepage?
Post by: webgift on August 07, 2017, 11:55:28

I assumed that you needed the default route. The Elxis formatted URI that will be used
as the site's frontpage. It's absolutely obvious that we don't use Elxis URIs instead of
URLs as @datahell mentioned.
Title: Re: content:WHAT? for homepage?
Post by: seadhna on August 07, 2017, 14:35:01
perfect, thanks guys!