#1 2016-07-12 23:18:56

d-mos
Member
2016-07-12
6

[resolved] How to add text in Homepage

Hello,
I am new to Piwigo, I adjusted the gallery and homepage to fit my original web page, but I can't figure how to add some text in homepage.

I want the homepage to look exactly like it is - the title (DIV titrePage) and the list of albums below it. But I would like to add some more text (like intro od main description between the title and the list of albums - so in the main block.

PWG stuffs does not do what I want - it can add a block above or below main, but I want to add some text in the main. Is there any way to do it easily?

Offline

 

#2 2016-07-13 12:34:06

tazattitude
Member
2015-07-13
54

Re: [resolved] How to add text in Homepage

If adding it directly above the main block of albums is no good and you want it within the main, I think you'll need to change a template

I would think you can copy the correct template from your "default" theme place the copy in your template extensions directory (make a new directory in this folder like "d-mos-templates" and place the copied template in the new directory.
Make the changes to the copied template file necessary to make the text show up exactly where you want it.

Then go to your control panel and go to the template section on the admin panel (under Configuration).
Then choose the copied file you just made changes to be the default file instead  the original file

i.e
copy
themes/template/header.tpl
copy file into - (make necessary changes to make your logo, text, image....or whatever)
template-extensions/d-mos/header.tpl (d-mos is your new directory you made)

Go to the admin panel and go to Configuration>> Templates
You'll see d-mos/header.tpl  -  change the original file next to it to header.tpl

d-mos/header.tpl is your new header template file

Doing it this way ensures you don't overwrite the original file when upgrading.

You might also look into additional pages and extended description. That might work to.
Make a new home page and see if you can include the albums

Offline

 

#3 2016-07-13 21:01:03

d-mos
Member
2016-07-12
6

Re: [resolved] How to add text in Homepage

Thank you for your advice. I am afraid that this kind of solution is quite complicated for me, I have no knowledge of PHP. I just used some CSS magic to adjust everything.
Maybe Additional pages could work, but I don't know how to get the list of albums to the page. I use a modified Clear theme.

Offline

 

#4 2016-07-15 00:30:12

d-mos
Member
2016-07-12
6

Re: [resolved] How to add text in Homepage

tazattitude wrote:

If adding it directly above the main block of albums is no good and you want it within the main, I think you'll need to change a template

I would think you can copy the correct template from your "default" theme place the copy in your template extensions directory (make a new directory in this folder like "d-mos-templates" and place the copied template in the new directory.
Make the changes to the copied template file necessary to make the text show up exactly where you want it.

Then go to your control panel and go to the template section on the admin panel (under Configuration).
Then choose the copied file you just made changes to be the default file instead  the original file

i.e
copy
themes/template/header.tpl
copy file into - (make necessary changes to make your logo, text, image....or whatever)
template-extensions/d-mos/header.tpl (d-mos is your new directory you made)

Go to the admin panel and go to Configuration>> Templates
You'll see d-mos/header.tpl  -  change the original file next to it to header.tpl

d-mos/header.tpl is your new header template file

Doing it this way ensures you don't overwrite the original file when upgrading.

You might also look into additional pages and extended description. That might work to.
Make a new home page and see if you can include the albums

I spent some time trying different solutions, plugins etc. and I must say that you solution is the best. I changed the template. It works perfectly. I hope that  my new template will not be overwritten after the next actualization.
Thank you very much.

Offline

 

#5 2016-07-15 00:47:10

tazattitude
Member
2015-07-13
54

Re: [resolved] How to add text in Homepage

Great to hear!!
As long as you keep the original template "original" and you put a duplicate copy (that you modified) in the template-extensions/d-mos folder, it should not since updates do not have this directory or file.

:)

Offline

 

#6 2016-07-15 11:38:00

d-mos
Member
2016-07-12
6

Re: [resolved] How to add text in Homepage

Yes, I have it in a new directory in template-extensions :)

Offline

 

#7 2016-07-15 12:17:39

tazattitude
Member
2015-07-13
54

Re: [resolved] How to add text in Homepage

You can actually do this and modify the template from the browser under LocalFiles editor >>> Templates

Offline

 

#8 2016-07-15 22:10:33

d-mos
Member
2016-07-12
6

Re: [resolved] How to add text in Homepage

Thank you, I use Local Files editor a lot. It is much easier.

Offline

 

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2025 · Contact