Posted by neofelis1985 on March 8, 2013 at 5:31pm
I created a image field and want to place it not in the content area. I want to place it after opening tag and output only the path to the image file.
I need following HTML/CSS markup:
<div class="headerimage" style="background-image: url(image-file.jpg);"></div>
I read some tutorials but not all works or are secure.
Comments
Why don't you create .tpl
Why don't you create .tpl file for the content type in which you want to display image field????
To create a .tpl file you have to create a file with name node--content-type-machine-name.tpl.php. Write your HTML code in this file and save this file in you active theme.
Yes, you are right but how i
Yes, you are right but how i can output simple a specific field via PHP in Drupal 7? At the moment it is in the content area. For example you see it here http://neofelis.de/drupal-commerce
neofelis - Internet-agency for Webdevelopment and Internet-Marketing
Visit us on http://www.neofelis.de
can you please explain little
can you please explain little bit more??
I have created a image field
I have created a image field in Drupal where i want to upload the header images. That is ok but now it will displayed in the content area and i need it after the opening tag because i want it as responsive background image. For example what i mean visit http://www.skype.de.
I tried this hardcoded with the page.tpl.php but it works not.
neofelis - Internet-agency for Webdevelopment and Internet-Marketing
Visit us on http://www.neofelis.de
I am looking at
I am looking at http://neofelis.de/en/drupal-commerce and the image which you have uploaded in content that is display in content area but you need this image above the "Drupal Commerce" title right?
I have following question.
1) Are you uploading image in content?? Did you created upload image field in content type??
2) After which tag you need to display image??
3) The tag after which you need to display is in Content area or in header??
4) Please give me the list of fields which you are using in your content type??
Please answer the above questions so my all dough are clear.
1. I created a image field
1. I created a image field for the node type and uploaded the image.
2. The best is to output this field before the title and content. Then can i can put this image with full width in the header area via CSS.
3. The best will be before the header. I can put my navigation layer over the image.
4. the list of current fields.
To use the headerimage module is for me to overhead.
neofelis - Internet-agency for Webdevelopment and Internet-Marketing
Visit us on http://www.neofelis.de
I have thought about the
I have thought about the solution. I make it now easily with views module. I create a template region and create a views block, that's it.
neofelis - Internet-agency for Webdevelopment and Internet-Marketing
Visit us on http://www.neofelis.de
I think it is also possible
I think it is also possible with .tpl file which i suggest you but i don't know the what is the problem you are facing with .tpl file. OK leave it, it's good to see that you found a solution.
Yep :). Thank you for your
Yep :). Thank you for your support.
neofelis - Internet-agency for Webdevelopment and Internet-Marketing
Visit us on http://www.neofelis.de