By NaSPA1 on
I would appreciate some guidance on how to add a banner display from the banner module to the XTemplate theme.
Thanks!
Radi
I would appreciate some guidance on how to add a banner display from the banner module to the XTemplate theme.
Thanks!
Radi
Comments
Banner module and Xtemplate theme
The banner module is relatively new: there is not much banner module expertise yet. You'll have add an extra field to the first
$xtemplate->template->assign()statement in thextemplate_header()function ofthemes/xtemplate/xtemplate.theme:This will create a new variable,
{banner}, that you can use in the header part ofthemes/xtemplate/xtemplate.xtmpl.Where is the xtemplate_header
Where is the xtemplate_header() in drupal 4.4? Working with the CVS versioמ, it seem it has been removed?
And I would appriciate a more detailed example of how to enable the banner in this version as well. I've got every thing working but I can't embed the banner_display(0) in a block nor in the theme/xtmpl files.
xtemplate_page()
As of Drupal 4.4.0, the functions
xtemplate_header()andxtemplate_footer()have been merged intoxtemplate_page(). Thus, you should modifyxtemplate_page()instead.If the banner documentation is not sufficiently explanatory, please file a task describing what you'd like to see documented. Jeremy, the author and maintainer of the banner module, has always been quite repsonsive.
Yes, I realized that after pl
Yes, I realized that after playing with this stuff. On the positive side, when you start doing so it realy helps you understand how drupal is working, which is cool :)
What I've done so far was:
1. Adding to xtemplate.theme under xtemplate_page()
"banner" => variable_get(banner_display(0))
2. Adding to xtemplate.xtmpl the following:
{banner} where?
Where exactly did you put {banner} in xtemplate.xtmpl?
Trying to get this to go in 4.3 -- God, what a struggle!
banner theming for dummies
"God, what a struggle!" I couldn't agree more. The dummie in the subject is me.
I'm working with 4.5 and the above instructions seem to be further out of date...?
I struggle with themes with each and every update. I'd suggest including a fully patched xtemplate.xtmpl file with the banner module. Patches are IMO inherently problematic for a high percentage of site creators and admins. Because banner areas (not just for ads...) are so common in themed headers it would be wonderful to have a 'header' banner tool like the great new logo upload tool which doesn't eliminate tweaking the header, but at least it makes the process easier. GZ
re: banner theming for dummies
Please refer to this INSTALL file for 4.5 installation instructions.
Please refer to this included patch file to see how to patch the xtemplate theme.
I've run the patch file and...
... no go, I haven't been able to get this to work.
I also picked appart the patch file and modified an original copy from the archive of the three files and I still don't see the banners.
I am running 4.5.2 with little to no modification yet aside from this module. I've installed the easy ones (those that don't require modding the app) this is my first attempt and a slightly more involved module.
Thanks in advance for any help!
re I've run the patch file and...
If you're having troubles installing the banner module, please open a support request.
I have banner working
If you are just looking for already patched theme files, check my post here http://drupal.org/node/15860 for where to get them from.
--
Drupal performance tuning and optimization, hosting, development, and consulting: 2bits.com, Inc. and Twitter at: @2bits
Personal blog: Ba
thanks but...
I ended up opening a support case. I tried the already patched files as well and they didn't show the banners either. It's really strange, I even took out phptemplate which I had installed and no go there.
How to make a specifc banner group appear in the header
Just thought it might be useful for people to know that you can define a specific banner group for the banners that should appear in your header (pushbutton theme) by editing the /themes/engines/xtemplate/xtemplate.engine file. Find the line
$xtemplate->template->assign('banner', banner_display());
and put the banner group number between the brackets after 'display'. If you want to change the group at a later date you will have to do so manually in this file.
Can't find line
Hi fjordans,
Can't find that line. Am using 4.6.
the code for showing the banner is...
Put it in your theme or even better, put it in a flexiblock! You will have more control where it will show. For example for the front page only. This is for 4.6.3 with phptemplate by the way.
Thanks and help. :)
Thanks for the tip, alex. Can you help me out with configuring flexiblock -- http://drupal.org/node/33765 . Thanks again! :)
Well....
Just follow the docs in the flexiblock :)
I added an article in there http://drupal.org/node/33765