If I want to change the content of the footer for $page['footer'] where do I change it? Im not talking about messing with the .info files. I dont know why its so hard to find!
Edit: If I am at on a page.tpl.php file and I do "print render($page['footer'])" how can I configure what is in the $page['footer'] variable to any html I want?
You should really read some of the basic documentation. Footer is a Drupal "region". Regions are populated with blocks.
block #
The boxes visible in the regions of a Drupal website. Most blocks (e.g., recent forum topics) are generated on-the-fly by various Drupal modules, but they can be created in the administer blocks area of a Drupal site. See the documentation for more information on blocks.
region #
Defined areas of a page where content can be placed. Basic regions include: Header, Footer, Content, Left sidebar, Right Sidebar. Different themes can define different regions so the options are often different per-site. Content is assigned to regions via blocks. They can be ordered by weight within regions to define the order in which they display.
If you want to add special static content to the Footer (e.g., Copyright notice, Admin email), you can create a custom block by visiting Home » Administration » Structure » Blocks (/admin/structure/block) and clicking "Add block" (/admin/structure/block/add).
If you want to display the content of a node in your footer, you may want to use Node Blocks. If you want to display the content of multiple nodes, you may want to use Views.
Related
I've been handed a design spec which requires a news listing in a specific format - e.g. image floating to the left, with the main title and content on its right.
I've created the articles listing using the views module and embedded the view as a block on the front page. However, I need to change the layout of the resulting list of items at an html level, as the items are not provided in the order or within the html tags that I need in order to deliver the design.
In order to style the output, I really need the views module to give me fine-grained control over the html tags being wrapped around each field for each article.
Is this possible in Drupal?
(edit: please note, this is not a css question - I know how to float and position things in css. I need to be able to modify the html tags applied to fields in a view - thanks!)
When you go to your view, you will see FORMAT. You can change the Format to HTML list with corresponding settings. Under Show, you will say Fields. In the FIELDS area, choose which content you want enabled. Let me know if this helps, or if you want more of an explanation. Go back into your view and click on your field. The next window that pops up should be to configure that field. You'll see style settings where you can define the HTML tags, classes, wrappers, etc.
I am new in drupal 7 and I want to create one view blog in which I can list out taxonomy as category and in under that I want to display two articles and a read more link to that category. Can any one explain in details how can i do that.
If you use a content type with a Term reference field for your category, it wil automatically create pages for each category with the articles tagged with that category listed within it.
If you want to have more control over these pages generated by the Taxonomy module, you can turn on the Taxonomy Term example view in de Views UI and add and remove the fields you want to display. The layout of these pages can be edited by creating a custom template file in you themes template folder for the file page--taxonomy.tpl.php.
There you could als create an additional block display (I assume you mean block when you say blog), and in the Page settings area, you can turn on de More link, and this will display a more link when more articles are available then you have set you pager to display (i.e. Use pager - Display a specified number of items - Items per page = 2). Make sure you change de setting from For all displays to This block (override) to not override the other displays.
This block you can place in any region on any page via the Blocks UI and is should do what you want.
I would like to have sections of a site so the top menu is a menu of sections such as "About Us". Then I want to have a secondary menu of pages within that section in the left sidebar. I know how to lay this out in drupal, but I want to make it easy for my end users to put the page they create into the proper section of the website. Would it be possible for me to create a taxonomy of terms that represent the 5 or 6 sections of the site and then somehow create the path to the page for the section they select in the taxonomy pull down menu?
Download Node Hierarchy, it has exactly that functionality
I'm new to Drupal but I've found my way around it pretty easily. There's just one thing I haven't found out how to do, and it's so simple it has to be possible.
I created a template for the site's homepage as it will have a different layout (did it creating page--front.tpl-php). This page will display only the main menu, an image and a text of the company's mission statement. I've done everything but the mission text and I have no idea how to do just that: simply put a block of text there.
I know I can hard-code it on the HTML but I want my client to be able to change it eventually if he wants to, in a graphic way. I tried creating a content type but I can't remove the title field and some submitted info; I thought of using Views but it seems too complicated for what I need, isn't it?
The image I used is hard-coded on he HTML as I know it won't change, but maybe I should have created a view with both the image and the text? But then how would I get rid of the title field and submission info?
Can someone please suggest the best way, if possible, to do this? Perhaps I'm over-complicating.
Thank you.
The easiest way would be to create a region in your theme and then put a block into that region only on the home page.
In mytheme.info:
...
regions[front] = Front Page Text
...
In page--front.tpl.php:
echo render($page['front']);
Then in your blocks administration page create a block and assign it to the "Front Page Text" region with the content you want to output. You could also limit the block's visibility to <front> if you want to be sure, although if you don't output that region in any other template file it shouldn't make a difference.
I have many content type that I have added in drupal 7 and I want them to be available in main menu. For example I have content types:
news
events
and I want the main menu look like
home - news - events
Despite I checked available menu > main menu
it doesn't show up in the main menu. How can I fix this?
Content types refer to the different types of nodes that you can create. Making your news content type available for the main menu means that, when you create news nodes, you can place them in that menu.
If you are trying to create a page that lists news nodes, you need to look into the Views module. It will allow you to create pages or blocks containing lists of content. Then, you can put those pages in the main menu. You can find the Views module here: http://drupal.org/project/views