I really need help.
I have decided to build a website with drupal so that i can add drupal to my skills, but i am starting to think i have made a big mistake.
I am a wordpress developer and have built most off my websites with wordpress. The probalm i am have is custom templates with wordpress i can just create a custom temaplate by add some shortcode to the head off my theme file easy.
How do you do this with drupal is it completely modular can you adjust themes i am struggling trying to find a way off doing this. i started with drupal 6 and this was possible by doing the following.
page-node-17.tpl.php
i could just then assign this to the specific page with a node of 17, i have since switch to drupal 7 and this doesnt work.
Can someone please tell me if this is possible.
Thanks
Yes this is still completely possible, however, the naming convention changed. Now you will need to name it: page--node--17.tpl.php. For more information on naming templates, see Drupal 7 Template Suggestions. Also, the Theming Guide is a very useful resource.
Related
I´m trying to follow this steps:
https://www.drupal.org/node/2025313
This is my first day in drupal and I have a problem in the first step =(
This:
Identify the file your theme function came from (theme.inc? a core/modules/color/?)
How I can find this "theme function"? I was looking for into a files of the project but I cand find this....
I get this project from other person and I can´t ask him "ey, where is the theme function?" Maybe I have wrong concepts and I don´t know where search...
Can someone help me?
Someone knows what I search? Is a funtcion? Is a file?
So the page you're looking at shows how to convert a tpl.php to a html.twig. This is showing you how to update a Drupal 7 theme to be compatible with Drupal 8.
Assuming that is in fact what you're trying to do, you will normally find Drupal 7 theme templates at sites/all/themes/YOUR_THEME_NAME/templates. Once you navigate there, you should see files ending in tpl.php. Inside these files you might find a theme function being used. You can identify them as they'll look something like function theme_YOUR_THEME_NAME_hook($variables).
What is a theme function?
A theme function is a PHP function that exists to provide HTML that is can be customized by themes and modules.
Here is the official list of theme functions. You can find a lot more information on Drupal.org, but here are a few starter links:
1. Theme API
2. Using the theme layer
3. Theme hooks
I would highly recommend reading a book on theming before tackling anything else. Drupal has a lot of depth, and if you're truly on day one and already converting themes, this will serve you well. I recommend 'Using Drupal' to understand the basics of Drupal, as a lot of Drupal development can be accomplished through the User Interface. Then move onto 'Drupal 7 Development by Example Beginner's Guide' to gain an understanding of how and when you should delve into actual code development.
So I have a Drupal 7 client who needs to have a dynamic content type...
name, description, 3 images
We will show these "objects" (for lack of a better word) in a filterable grid. Also, the client needs to be able to add, update and delete these on their own.
I have done this sort of thing many times in WordPress with the plugin called "Types" (https://wordpress.org/plugins/types/).
Is there an equivalent plugin for Drupal 7? If not, any thoughts as to how I would go about this?
Thanks,
David
One of the great advantages of using Drupal is that it is a framework for creating custom content types very easily using the administrative interface. See this for further reference and good luck!
http://m.linuxjournal.com/content/creating-and-theming-custom-content-type-drupal-7
I am working on a site which has a RapidWeaver Theme ( f_fusion ). But I am more of a developer than a designer. Is there any way for us to convert a RapidWeaver theme easily to a Drupal6 theme so that all the styling remains the same ?
Yes, it's possible, particularly if you're a developer since it's really a question of taking the HTML & CSS from the RapidWeaver Theme and placing Drupal variables in it.
Start with checking this link to get an overall idea about Drupal Theming
When you know how to create a basic theme structure, you should learn how to modify the page.tpl.php file to start with, after that it will of course depends on the specifics of your site but you definitely should be on your way.
If you want to dig deeper, check this book: Pro Drupal Development
I've installed CiviCRM with my drupal installation, and I am creating a custom theme. What is a good resource for utilizing CiviCRM elements in the theme?
I need to give/pull these things to/from CiviCRM:
Registration elements, Basic CiviCRM variables, and Profile elements...
Sorry if it seems like a newbie question to some of you, but CiviCRM.org seems like it's too full of filler language...
Thanks
What you're looking for is the CiviCRM API. Try this page:
http://wiki.civicrm.org/confluence/display/CRMDOC40/CiviCRM+Public+APIs
EDIT: Updated link
I've never used CiviCRM, but a good resource for finding how to retrieve data from CMS modules in general is to look at the code for the module/extension/plugin itself. It will often be retrieving information the same way you can for your template.
Hi Everyone I am new to drupal and i am working on drupal theming i have created my own modules which have textfields and javascript validation in it. Now i am trying to create own theme for my module but i am not getting how to do can anyone pls give me a idea of how to do from basic or any links which explains in detail from scratch. thanks in advance.
You don't create themes for modules, themes are made for an entire site which will have several modules enabled.
If you want your module to be themable, that is, make it easy to alter the markup it generates, you will have to use the drupal theme system.
For the most part, when your module needs to generate some markup, you need to use the theme() function.
Sometimes you will need to create some custom markup which there is no theme function for. If that is the case, you will need to register your theme functions, so Drupal know they are there and so themes can overwrite them if needed. This is done with hook_theme().
There is a guide for developers on how to use the theme system.
Hook_theme() is used to define your modules theme implementations.
This looks like quite a good overview.