Active
Project:
Danland
Version:
7.x-1.0
Component:
Documentation
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
29 Dec 2010 at 10:27 UTC
Updated:
19 Jun 2019 at 08:53 UTC
Jump to comment: Most recent
Handbook says: "For Danland 6.x-2.x, after renaming the page-front.tpl.php to page.tpl.php then you must change the code in template.php"
There is no page-front.tpl.php in 7.x so what file has to be renamed? Changing the code in template.php doesn't work.
Comments
Comment #1
seaurchin commentedComment #2
danpros commentedHi,
You should upgrading Danland to RC2 :)
The Drupal 7 version of Danland is a little different, you can creating that by removing the following line in page.tpl.php:
The rest is like on D6 of Danland.
Dan
Comment #3
seaurchin commentedUsing rc2 with a fresh template.php and page.tpl.php, I tried your suggestion with the default slideshow a few times, but no luck.
Every time the slideshow disappears completely and a black, graded shadow appears instead, which obscures the bottom of each section of main content.
(The only other change I have made is using the Superfish Drop Menu very successfully, and this is still working fine.)
This is a stunning and versatile theme and it would be great to have the option of a slideshow banner on each page.
Thanks for your input.
Comment #4
danpros commentedHi,
I think you are missing somethings here. The page.tpl.php code must become like this
Dan
Comment #5
seaurchin commentedGot it! The problem was that I deleted the wrong ?php endif; ?> on Line 78, which caused the shadowing.
Your example showed me that it was line 93 that needed to be deleted.
Hope this helps someone else and many thanks for your support.
It works beautifully!
Comment #6
seaurchin commentedI see that the changing images of the slideshow show only on the first page, while the other pages show only a the first static image. Is there a way around this?
Comment #7
danpros commentedHi,
You forgot to change this in template.php
to this
Dan
Comment #8
seaurchin commentedThank you very much, Dan. I'll close this one for you.
Comment #9
etcbbu commentedI'm using Danland 7.x-1.0 (default theme).
I'm having trouble understanding, on this topic, what exactly needs to be changed in order for the slideshow to chow on every page. Do I need to edit
page.tpl.php
or
template.php?
Comment #10
etcbbu commentedIs this topic still active at all? I'm trying to figure out how I can place the Danland slideshow on all pages of my website..?
Comment #11
Edy Gorbacev commentedyou should see from the top first and check one by one their conversation. its already clear by dan's statement.
Oke.. Il explain it one more time :)
First: Open your page.tpl file at danland folder theme,
there is a code start with
<?php if($is_front): ?>delete that statement.. next scroll down again..
and you will see the end of "IF" statement like this
<?php endif; ?>delete that too.. and save your page.tpl
NEXT..
open another file named template.php in the same folder as your page.tpl file in danland folder theme:
Look at the bottom of the script.. there is:
now.. after you found it.. than delete it and add new like these:
done.. and dont forget to CLEAR YOU CHACE before you can see your change.. (or maybe not :D just in case)
If you patient and read it carefully you will find what you want.. :D
Comment #12
etcbbu commentedI am sorry--I was confused because people were talking about various versions of the module and stuff, and I couldn't tell which of those two tasks needed to be done in this-and-this version, or which one/ones of the task needed to be done in that-and-that version. And I *did* do that first step, which was the
First: Open your page.tpl file at danland folder theme,
there is a code start with
if($is_front):delete that statement.. next scroll down again..
and you will see the end of "IF" statement like this
endif;delete that too.. and save your page.tpl
And it didn't exactly work, heh, because it just made a blank square and the little shadow on my site; I neglected to do that second step with template.php, and was unsure what I was supposed to do.
Thank you for the post--I will do that, I appreciate it.
--etcbbu
Comment #13
etcbbu commentedIt did not work for me :-/ Here is my site:
http://tales-central.com/drupal
On the page.tpl, when I am supposed to find
<?php if($is_front): ?>and
<?php endif; ?>I did that! I found them both and deleted them!
Now, in page.tpl it also finds
<?php if($is_front): ?>again--am I supposed to delete it in this spot? Here is an image of what I am talking about:
http://tales-central.com/drupal/pagetpl.png
And here is what my page.tpl file looks like, in the area where I am supposed to delete the two statements. Please tell me if it looks right:
http://tales-central.com/drupal/pagetplright.png
And here is what my templates.php file looks like where I was supposed to do the replacing of statements. Please tell me if it looks right:
http://tales-central.com/drupal/templateright.png
Comment #14
etcbbu commentedSorry--I mis-posted those images a moment ago. The links are correct now.
Comment #15
Edy Gorbacev commentedo.. oo.. you delete the wrong line
open again your page.tpl file (before you add new line etc..)
and go to line 70
now.. here is the scrip from line 68:
beside that code.. even there is another line called the same
if($is_front):, just leave it.Comment #16
etcbbu commentedThanks so much--works like a charm!
Comment #17
Edy Gorbacev commentednice to hear that .. :)
this theme very easy to costumize... go for it..!!
Comment #18
etcbbu commentedI'm getting the problem that seaurchin mentioned, where the slideshow scrolls through images on the front page, but not on the rest of the pages. They just show a static image.
I'm pretty sure that my page.tpl.php file is fine and good, and changed how it needs to be.
But now with my template.php file, I tried to change it from being this way:
http://tales-central.com/drupal/templateasis.jpg
to making it look like this:
http://tales-central.com/drupal/templatechange.jpg
But then when I tried to go to my site, I just got a php error and my site wouldn't load at all. It said I had an error in template.php on a certain line.
What am I doing wrong? I took the statement you said earlier, which was:
to this
drupal_add_js(drupal_get_path('theme', 'danland') . '/scripts/jquery.cycle.all.js');And, basically, as you can see with those images I posted, I just deleted the
if (drupal_is_front_page()) {in line 29, but that seems to have created an error.
What did I do wrong? What exactly needs to be changed in template.php?
Comment #19
etcbbu commentedSo, was I wrong? All I did in template.php was delete
Was that the wrong thing to do?
Comment #20
etcbbu commented...wow. Literally the only problem was that I did not delete the very last character in the template.php script, which was the end curly bracket character. I deleted that, and all is well now.
Thanks for this topic, y'all--it really was helpful for me; both in reading the history of other peoples' asking about this before, and then my own questions' being answered.
Comment #21
boefie commentedHow to displaying the banner on all pages except one ?
I try with if ($node == 'pagename') {
image 1
image 2
} else {
image 3
image 4
}
endif
But the variable $node was unknown
Is there an solution ?
Comment #22
joshua.rosaaen commentedHow can I display a different banner for each page in the Danland theme? I have a product line that I would like to have different banners for and am trying to utilize as much theme as possible...but I am stuck on being able to make the page display different banner than front page one. I am new to Drupal and would really like some help on this...suggestions please. I am not seeing any differentiation between pages and I would like to be able to do that if its possible...some links on where I can learn this would be helpful since I do have 3 other page types I would like to apply this line of thinking to...I am thinking that I can use the (name)--tbl.php file for each page I want to apply a banner to but I am not sure how best to implement this...again I am a newbie...so please go easy on me. LOL!!! Thanks in advance
Comment #23
irene_ commentedHow can I display a different banner for each page in the Danland theme? It seems that it isn't a response for the last post.
Thank you!
Comment #24
bgrega commentedI'm running Drupal 7, I have made the changes to the following files per your directions, however, I get nothing on my other pages, I have cleared my cache through drupal and my browser. Any suggestions. Here is the code I changed. Thanks. Oh, I am quite the Newbie also.
my page.tpl.php:
and my template.php:
Comment #25
supermatso commentedLadies and Gentlemen where do i get the download link for the 7.x-1.0-rc2,I have tried removing the lines as suggested on this forum but i quess is failing because i have not upgraded to the RC2 please i need the link.
Thank you
Comment #26
kazar commented"rc" means "release candidate" for the version. "rc2" means "the second release candidate for the version".
Therefore, "7.x-1.0-rc2" would have been the 2nd release candidate for 7.x-1.0. Therefore the current actual release, 7.x-1.0, is a later version than it's release candidates. Going back to an rc version would be a downgrade, not an upgrade.
You'll notice that comments referring to "rc2" are dated December, 2010. The actual release version (7.x-1.0) is dated January 11, 2011. Any successful changes made in the rc's would be included in this release version.
There is some other reason why you are having trouble, then. Sorry I can't help with that part, but I hope this info is useful to you anyway.
kazar
Comment #27
supermatso commentedThank you Kazar, it makes perfect sence.The problem i have is to display the slideshow module on all pages for the Danland theme, i have tried all the options mentioned here but they break the theme
Comment #28
eeric49 commentedThank you for the grate solution for a slideshow on all pages. This is one thing that makes danland the best theme.
Once again for those who have not managed to get it working
template.php..do the following
//if (drupal_is_front_page()) {
drupal_add_js(drupal_get_path('theme', 'danland') . '/scripts/jquery.cycle.all.js');
//}
page.tpl.php
delete the following..
if($is_front):endif;check it out here..
kenia safaris
Comment #29
Xagarsan commentedThank you for the solution
Xagarsan
Comment #30
501sttrooper commentedeeric49 -
I have the most up to date version of Drupal and Danland. Tried your suggestion with template.php and page.tpl.php and couldn't get it to take. When you say "delete the following", were you saying get rid of everything in the page.tpl.php file or perhaps specific lines? Still testing and wanted to see if you had any other suggestions. Thanks!
Comment #31
501sttrooper commentedFigured it out after re-reading...patience is a virtue that I sometimes lack ;)
Comment #32
tmwpnpnpnp commentedThanks Guys this one was very helpful!
Comment #33
b4comic commentedthanks guys.....
Comment #34
grkm2002 commentedI am using drupal 7 version of the theme. I've add a slideshow region to danland.info and updated my page.tpl.php. I am able to get a views slideshow to appear and when not using the views slideshow the original slideshow comes back. However, I am unable to get my pager to show up at the bottom of the views slideshow on the frontpage banner.
What am I doing wrong? This is how my page.tpl.php looks
Comment #35
andreacb commentedFor drupal 7:
My small contribution for ones who may want to have slideshow displayed only in selected pages.
In my case, it's a multi language small site with a number of 'home' pages (thus, with not hust a front page but one for each language)
To solve this need, you simply need to add a test on the page.tpl.php replacing the stardard one.
From:
if($is_front):To (for example):
if (stripos(drupal_lookup_path('alias',current_path()),"home")!==FALSE):In this example the name of the pages which are to display the slide show have 'home' as part of their URI alias.
Hope it helps.
Comment #36
andreacb commentedYou may want to change template.php as well.
From
to (for example):
Comment #37
danpros commentedComment #38
tryitonce commentedI came back to this thread with the problem of banners not rotating on pages other than the front page.
The thread gave me the answer within the first few comments.
It occurred to me that the advice to delete parts of the code in the page.tpl.php and the template.php might not be the best help, especially for the occasional coder.
We prefer to comment out the unwanted code and can thus follow exactly what we did or did not do at the time:
Thus the changes look like this:
page.tpl.php
To the lines to be commented out we add the !-- after the < and -- before the ending >. The lines to be "dropped" change from
to
<!-- ?php if($is_front): ? -->
.....................
<!-- ?php endif; ?-->
You can see the effect alreday in the text editor here - the active php code above needs to be but into the "<-code-> ... <-/code->" tags. The lines with the commenting out characters do not need them.
The complete entry looks like this:
In this example the banners (slides) are numbered 1-5 (plus an index for project and size _s_950x200.jpg). We then just change these five images from time to time. For one project we hold images in 4 folders for the four seasons and change the set when the time comes. Each folders holds slides with exactly the same name, but (obviously) different images.
---------
template.php - the commenting out is a little different and simpler - all you need are two //:
becomes
And if you use a developers text editor it will show the changes by changing the colour of the lines commented out helping you to see what happened and what might be missing - we use PSPad under Windows and Sublime, GNU Emacs 24, Geany or similar under Linux.
...
Comment #39
bozzochet commentedCiao,
I feel my self very stupid...
I installed Danland (taking from here https://www.drupal.org/project/danland , so I'm quite sure is the last release...) on my Drupal 8.7.3.
I try to follow https://www.drupal.org/node/768350 but there's no single file or line of code that is equal to the handbook. Some of them are similar and I was able to customize something enabling and using the
local.cssfile, but part of them are completely different or however not working.I'm trying to have the slideshow banner on all the page (not only the front one). Following this post and also other I edited:
in particular like this:
(removing the "front" if and the else case)
(so commenting the "front" if).
These are similar to the 'proposed' changes to
page.tpl.php(that I do not find...) but however I didn't notice any change to the website. On the contrary I'm not able to find thetemplate.phpfile or any other file with something similar toWhere I'm wrong?
Thanks,
Matteo