Custom Title and RSS icon position
chrispy - October 23, 2009 - 05:59
| Project: | Quotes |
| Version: | 6.x-1.x-dev |
| Component: | User interface |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
Description
1) I would like to have a title on the page where all my quotes are listed and appear right above the listed quotes on my quotes page. Is this possible? I cannot find this as a setting. Better yet, can I customize this title so I can add a graphic followed by text (the graphic is the first letter of the title) in one of the module files?.
2) I would like to use the RSS icon/feed but it butts up right against the last quote on the listing page. Is there somewhere where I can add in a break or two to move it down?
Thanks and thanks for a great module!

#1
I'd be interested in this also...
#2
There are a number of different ways to do what you want. They all will require you to modify the quotes.css file.
There are a couple of ways to do this depending upon whether the page your looking at creating will require it's own theme page or just changing the css file. In either case it would be best to copy the css file to your theme directory and to modify the themes info file. Another option would be to copy its contents to your themes css file itself. If you leave it where it is then on upgrading to a newer version you will lose your changes as the css file will be written over by the update.
If you could point me to a page or post a screenshot of what you want I could futher define the steps involved. A good starting point would be to read Drupal 6 theme guide
#3
http://www.arranbennett.com/quotes
I'm trying to get that page to look like the rest of my nodes... Obviously the individual quotes are nodes themselves, thats why each of them has the node theme...
I'm really not sure how to go about it...
#4
Right so I've managed to format the quotes page how i'd like, well as much as I could..
Still struggling with where to put code for the page title and perhaps a bit of body... To go above the list of quotes...
Would this go in the quotes-node.inc ?? Or in the module file itself?!
Any help would be great
#5
You could modifty the quotes.inc file but would not recommend it. Instead I would create a quotes-page.tpl file
Have you already tried modifying that file, I went to http://www.arranbennett.com/quotes but it's displaying theme errors
#6
Hmmm... Is it still throwing up theme errors now?
I'm not recieving any errors...
I've edited the quotes.module file a bit... Haven't touched any of the .inc files though...
I created a new template file for the quotes node called node-quotes.tpl and that seems to be working ok, I'll mess with that a bit more at a later date to get it exactly how I want. This template is obviously included in the quotes parent template though...
So if I was to create a page-quotes.tpl, how would I go about including the quotes page within it? Is that what you're saying?
#7
I thought about the node-quotes.tpl as a second thought after replying. Guess it depends on how you want the page to look as to which would be the better solution.
If you want the Quotes relate modification at the top of the main area make a copy of page.tpl, rename it and modify it similar to what you did when creating the node-quotes.tpl but only use one or the other.
As a example, here is a cutup zen page.tpl where the you would place you modifications
<code>
<div id="main"><div id="main-inner" class="clearfix<?php if ($primary_links || $navbar) { print ' with-navbar'; } ?>">
<div id="content"><div id="content-inner">
<?php // place quotes modification here ?>
<?php if ($mission): ?>
<div id="mission"><?php print $mission; ?></div>
<?php endif; ?>
<?php // place quotes modification here or here ?>
<?php print $content_top; ?>
<?php if ($breadcrumb || $title || $tabs || $help || $messages): ?>
<div id="content-header">
<?php print $breadcrumb; ?>
<?php if ($title): ?>
<h1 class="title"><?php print $title; ?></h1>
<?php endif; ?>
<?php print $messages; ?>
<?php if ($tabs): ?>
<div class="tabs"><?php print $tabs; ?></div>
<?php endif; ?>
<?php print $help; ?>
</div> <!-- /#content-header -->
<?php endif; ?>
<div id="content-area">
<?php print $content; ?>
</div>
<?php if ($feed_icons): ?>
<div class="feed-icons"><?php print $feed_icons; ?></div>
<?php endif; ?>
<?php print $content_bottom; ?>
</div></div> <!-- /#content-inner, /#content -->
<?php if ($primary_links || $navbar): ?>
<div id="navbar">
<a name="navigation" id="navigation"></a>
<?php print theme('links', $primary_links, array('id' => 'main-menu', 'class' => 'links clearfix')); ?>
<?php print $navbar; ?>
</div> <!-- /#navbar -->
<?php endif; ?>
<?php if ($left): ?>
<div id="sidebar-first"><div id="sidebar-first-inner" class="region region-sidebar-first">
<?php print $left; ?>
</div></div> <!-- /#sidebar-first-inner, /#sidebar-first -->
<?php endif; ?>
<?php if ($right): ?>
<div id="sidebar-second"><div id="sidebar-second-inner" class="region region-sidebar-second">
<?php print $right; ?>
</div></div> <!-- /#sidebar-second-inner, /#sidebar-second -->
<?php endif; ?>
</div></div> <!-- /#main-inner, /#main -->
Another possibility would be to create a block-quotes.tpl instead of node-quotes.tpl, all depends on what you ultimately are looking for.
#8
Hmmm,
The funny thing is, I've just switched the Garland theme and the Title is working as it would with any other node...
It must be something to do with my theme, perhaps I should look at the differences in code between the Garland and my own...
Thanks for your help so far, by the way... Very much appreciated
#9
Right,
In comparing my page.tpl to every other, well I can't see what I'm looking at.... Sick and tired of it really now...
So I'm going to create a node/page template specific for the job...
Now the code you posted above... I don't suppose you or anybody have any idea what the quotes modification code is?
Once I know that, I can just get on with it...
Thanks