Use 2. <h1> tag as first site.

About the template and stylesheet - and changing the menu
Post Reply
maeg
Posts: 525
Joined: Fri Feb 20, 2009 2:27 pm
Location: Agerbæk, Denmark
Contact:

Use 2. <h1> tag as first site.

Post by maeg » Wed Aug 14, 2013 8:05 am

Hi

Normaly the 1. site you se when you browse a url is the 1. <H1> tag in the content.htm file. Is it possible to make so it shows the 2. <h1> tag as 1. site without to hide the 1. <h1> from the menu???

Have a nice day :D

Jens

Gert
Posts: 3078
Joined: Fri May 30, 2008 4:53 pm
Location: Berlin
Contact:

Re: Use 2. <h1> tag as first site.

Post by Gert » Wed Aug 14, 2013 10:06 am

Hi Maeg,

do you mean something like this:

anywhere in the userfuncs.php (if not exists, create in ./cmsimple/)

Code: Select all

if($s < 0) $s = 1;
Gert
Gert Ebersbach | CMSimple | Templates - Plugins - Services

cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: Use 2. <h1> tag as first site.

Post by cmb » Wed Aug 14, 2013 10:37 am

Gert wrote:do you mean something like this:
[...]
This is quite likely to give strange results in the back-end for "special pages" (Files, Settings, Plugins etc.). It's worth a try, however.

Another possibility is to use mod_rewrite (on Apache). A single rewrite rule would suffice (I can't give the exact rule off the top of my head; would have to look it up and try it out).

Yet another possibility is to add a hidden page in front of the first, and to redirect this with page_params to the "second" (actually third) page.

Christoph
Christoph M. Becker – Plugins for CMSimple_XH

Gert
Posts: 3078
Joined: Fri May 30, 2008 4:53 pm
Location: Berlin
Contact:

Re: Use 2. <h1> tag as first site.

Post by Gert » Wed Aug 14, 2013 10:54 am

Code: Select all

if($s < 0 && !$adm) $s = 1; 
Gert Ebersbach | CMSimple | Templates - Plugins - Services

cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: Use 2. <h1> tag as first site.

Post by cmb » Wed Aug 14, 2013 11:04 am

Gert wrote:

Code: Select all

if($s < 0 && !$adm) $s = 1;
Still, that doesn't work as expected for sitemap and mailform (and maybe others).
Christoph M. Becker – Plugins for CMSimple_XH

Gert
Posts: 3078
Joined: Fri May 30, 2008 4:53 pm
Location: Berlin
Contact:

Re: Use 2. <h1> tag as first site.

Post by Gert » Wed Aug 14, 2013 11:11 am

Code: Select all

if($_SERVER['QUERY_STRING'] == '' && !$adm) $s = 1;
I wrote "something like this", to find out, if it is what he meant :roll:
Gert Ebersbach | CMSimple | Templates - Plugins - Services

maeg
Posts: 525
Joined: Fri Feb 20, 2009 2:27 pm
Location: Agerbæk, Denmark
Contact:

Re: Use 2. <h1> tag as first site.

Post by maeg » Wed Aug 14, 2013 5:55 pm

Hi
Gert wrote:Hi Maeg,

do you mean something like this:

anywhere in the userfuncs.php (if not exists, create in ./cmsimple/)

Code: Select all

if($s < 0) $s = 1; 
Gert
It seems to work without problems, also with the file browser in admin

Thx

Jens

Gert
Posts: 3078
Joined: Fri May 30, 2008 4:53 pm
Location: Berlin
Contact:

Re: Use 2. <h1> tag as first site.

Post by Gert » Wed Aug 14, 2013 5:58 pm

Hi Maeg,

there is the second page below the sitemap and the mailform. Better use the latest code:

Code: Select all

if($_SERVER['QUERY_STRING'] == '' && !$adm) $s = 1;
Gert
Gert Ebersbach | CMSimple | Templates - Plugins - Services

Post Reply