I have a content type which displays an image.
When this image is displayed as regular node page (node/xxx), I would like it to use the regular template file.
When this image is displayed in a modal (Lightbox2 popup modal), I would like it to use another template file (to remove the header and footer, change background, etc).
How can I set two different templates for the same node?
Thanks,
You probably want to use page-node-lightbox2.tpl.php which can be found in the lightbox2 module folder. Copy that file to your theme folder and make all the changes you want, then clear your cache (www.example.com/admin/settings/performance) and you should see the changes to the modal view of your images.
Related
This may be a strange question, but I want to use 2 of the same buttons on my mobile checkout page in woocommerce. I think this is much better for the user experience because the button to "place order" is pinned to the bottom of the mobile browser so as you can see in the image below.
In my screenshot i made a circle with 2 inside, its on the end of all fields. I think it would be great to create an extra button there.
Is that possible and can that work together? And in what file do I need to edit this?
Really thanks for any help or advise!
As you can see the code for the button is in the next template file
https://github.com/woocommerce/woocommerce/blob/163aaa029dc57b1b04f6ca583bc04c4c4e1b6767/templates/checkout/payment.php#L51
How to Edit Files
Edit files in an upgrade-safe way using overrides. Copy the template into a directory within your theme named /woocommerce keeping the same file structure but removing the /templates/ subdirectory.
Example: To override the admin order notification, copy: wp-content/plugins/woocommerce/templates/emails/admin-new-order.php to wp-content/themes/yourtheme/woocommerce/emails/admin-new-order.php
The copied file will now override the WooCommerce default template file.
Be aware that when moving, the button must still be between the <form></form> elements
I would like to remove one of the pictures on this page http://www.seobrand.com/online-reputation-thank-you but when I click edit, the cms doesn't show those contents .Why and how to fix it ?
Your theme is likely using a function like;
get_template_part()
to render that part of the page. dig into your themes files for page.php and see if you can find a call like that. If you modify the template that corresponds with that call you will be able to see the markup and remove the picture from that content.
I have got images in my content type and i want to show them in node type.
I've tried to use flexslider, but it doesn't format it.
http://i.stack.imgur.com/wUFk3.png
When i try to use field slideshow module, i had result like this
http://i.stack.imgur.com/P3CT5.png
So, i cannot choose carousel skin. Files path is /sites/all/libraries/jquery.jcarousel/skins
Guys, how i can make a slider with thumbnails in drupal?
You could try this module Views Slideshow JCarousel
You don't need drupal module for everything - a lot of stuff you can do on your own by using custom content types and 3rd party JS libraries:
Define content type, as you did, to hold data and make page editable.
Create new content type for page displaying effect.
Find some JS library (don't have to be drupal related) doing your effect
Create template file for your second content type
Copy HTML from that JS library example page inside your template file
Include necessary JS and CSS file - make it work static first.
Create some view to get effect data from your original content type
Use views_get_view_results() to get effect data inside your second content type. Loop trough it and print out data you get instead of static values
Or use views_embed_view() instead - makes no bid difference.
Check this out, it's what you're searching for https://www.drupal.org/project/galleria
I'm new to editing the footer in magento. I want to use my footer instead of default and managed to remove QUICK LINKS and ACCOUNT according to this, but the 2 footer blocks showing in red block are placed vertically which I wish they are in horizontal and in the same format with the green block(colored title and black links). Please help me out.
For Footer Area, we are divided in two parts for fetching the information.
One part is a static block which created within the Magento admin area (CMS > Static Block).
The other part is held as .phtml / .php / .xml files within the design files.
XML files location: app/design/frontend/PACKAGE_NAME/THEME_NAME/layout/page.xml , app/design/frontend/PACKAGE_NAME/THEME_NAME/layout/cms.xml
Here you will find some footer references which which take you to .phtml files.
Eventually, you will be required to follow this two paths to get all the sections of footer sorted out and you will be able to edit everything at the end as I see it :)
Go to System -> Configuration in the main menu
Go to Developer on the bottom left under ADVANCED
Switch to the store view on the top left to your current website or store view.
Under the Debug tab of the same Developer config page you will see a new option appear that will allow you to turn on/off template path hints.
Then refresh your frontend page. This will help you determine the phtml file that's arranging the layout of divs in your footer. Once found you can overwrite the file if it's a default one into your own theme's folder.
Follow the bellow steps to edit footer :
Got to :
/app/design/frontend/default/yourtheme/template/page/html
Inside html directory you have footer.phtml file. Download and edit.
If you have any query paste in comment.
The links are available on Admin menu -> CMS -> Static Block
Here you choose Footer Links and Add/Modified your required links.
I have a View which is a series of images. I need the output of the View to be a div for each result with the image set as a background image with an inline style.
If i rewrite the output of the display as below, the divs are created but without any inline styles.
<div class="image-div" style="background-image:url('[field_image_fid]'); width: 250px"></div>
Note, its not that the styles are their but incorrect, they are completely stripped. From reading some posts I think this is a Drupal security measure, but I dont know how to turn it off. Apparently the Views Custom Fields module is a work around, but it seems to strip my fields also.
Thanks
You can edit the field template for that field, check the theme information section under Basic Settings (D6) to see which template to use from the Views module directory. Copy that file to your theme directory, make changes and save then rescan the template files in your view.