how to setup portfolio

smith's picture
smith
Thu, 03/17/2016 - 01:17
#1
how to setup portfolio

hello,I use portfolio-wide-3-columns-no-space to homepage,and I want to change a little about it

1,the image is 640X400 default,I want to chage it to other size.

2,about button"zoom"and "see more",I want to delet it.

how can I to do this thing?I can not find the way to do,thanks

Smith

phuonght's picture
phuonght
Thu, 03/17/2016 - 05:56

Hi,

Could you send us your site url and point out location of your portfolio block which you would like to customise?

smith's picture
smith
Thu, 03/17/2016 - 10:06

hello,my site is not yet complete,I mean that  when people move the mouse up to each portfolio image ,that will appear file name/catalog and two button(zoom and see more),each porfolio image is 640X400 default,and I want to delet two button(zoom / see more),because people can click the file name to enter content.

thanks

smith's picture
smith
Fri, 03/18/2016 - 00:17

the red circle is that I want to customise,thanks

Image title

marta.oliveira's picture
marta.oliveira
Sat, 03/19/2016 - 13:53

Hi , 

can you tell the solution to this customization?

I need this too.

also i want to customize the size of display style  ( gallery, fixed text) inside portfolio content type

regards

Marta

smith's picture
smith
Mon, 03/21/2016 - 02:15

hi,I want to change "640X400" to other size,and delete button "zoom" and "see more",please tell me how to do,thnaks

Smith

Image title

cindy's picture
cindy
Mon, 03/21/2016 - 03:45

Hi,

1, change the image size (640X400 default)

- Step1: Please go to yoursite.com/admin/config/media/image-styles/add and create image style as you want

- Step2: Open folder sites\all\themes\md_make\templates\views\block\portfolio => find all files, of which name starts with views-view-fields. In those files, search and change the code:

$image_path = file_create_url($row->field_field_multimedia[0]['rendered']['file']['#item']['uri']);

to:

$image_path = image_style_url("large", $row->field_field_multimedia[0]['rendered']['file']['#item']['uri']);

In which, large is the default Drupal image style large. You just renam to image style (in step 1)

Then search and change the code

<?php print render($fields['field_multimedia']->content); ?>

to

<?php if($row->field_field_multimedia[0]['rendered']['#file']->type == "image"):?><img src="<?php print $image_path ;?>" alt=""><?php else : print render($fields['field_multimedia']->content); ?><?php endif;?>

Save and clear cache

All files you need to change the code are highlighted in blue as follow:

Image title

2. Delete 2 buttons:

Please open template files inside folder sites\all\themes\md_make\templates\views\block\portfolio and remove the following code:

<a href="<?php print $image_path; ?>" class="magnific btn button-line button-white btn-rounded hover-effect"><?php print t('ZOOM');?></a> <a href="<?php print render($fields['path']->content); ?>" class="btn button-line button-white btn-rounded hover-effect"><?php print t('SEE MORE');?></a>

Or

You just need to hide those button by go to Themesetting => Custom code => Custom CSS, and add

.portfolioContainer .see-more .hover-effect {   display: none;}
marta.oliveira's picture
marta.oliveira
Mon, 03/21/2016 - 13:18

Hi Cindy 

thanks for your answer

i can do this changes to change image size in portfolio content type -> display style -> Fixed text???

thanks

cindy's picture
cindy
Mon, 03/21/2016 - 22:54

Hi Marta.Oliveira,

To custom image style for portfolio node, please download the attched file in your email (we sent you an email) and replace the old file Field--Field-Multimedia--Portfolio.Tpl.Php in sites\all\themes\md_make\templates\fields\portfolio

Then open the new file, search the code 

$style_img = "large";

and change large with the value of image style you want

smith's picture
smith
Mon, 03/21/2016 - 23:14

thanks for reply Cindy,could you send me a file copy that you send to Marta.Oliveira?I want to try more change for the theme,and why need a new file to replace the old,why cant to do inside old file?thanks

cindy's picture
cindy
Mon, 03/21/2016 - 23:16

Sure, 

Please check your email, Smith

marta.oliveira's picture
marta.oliveira
Mon, 03/28/2016 - 17:24

Hi,

in post #7 describe the change of image size in views, but this applies do view - our recent work?

I need to put the image appears with all image , and not cuted

thanks

marta.oliveira's picture
marta.oliveira
Mon, 03/28/2016 - 17:24

Hi,

in post #7 describe the change of image size in views, but this applies do view - our recent work?

I need to put the image appears with all image , and not cuted

thanks

phuonght's picture
phuonght
Mon, 03/28/2016 - 23:46

Hi,

We can get full image for "Our recent work" if we remove image style. However, if we do not use image style, images will display with different sizes leading block will be broken. 

Image title

So we highly recommend you choose a type of image style that suits to your purpose. Example: image style Scale and crop 

Image title

To use image style in Block our recent work, please :

  • Go to /admin/config/media/image-styles/add

  • Add new image style with machine name: portfolio_380x400

  • Open source code, replace file sites\all\themes\md_make\templates\views\block\portfolio\our recent works\views-view-fields--portfolio-our-recent-works-.tpl.php with enclosed file in our email.

=> configure image style "portfolio_380x400": select type of scale, resize or drop with 380x400. scale and drop is a good choice.

marta.oliveira's picture
marta.oliveira
Tue, 03/29/2016 - 17:11

Hi, thanks

it's working :)

marta.oliveira's picture
marta.oliveira
Sun, 05/01/2016 - 12:28

Hi, 

it is safe to use

https://www.drupal.org/project/ais

in this view?

i want to out the images with several sizes and i dont want to remove style ( However, if we do not use image style, images will display with different sizes leading block will be broken. in post#14)

can i use this module in the same view that you send me by email?

if not, can you guide me and tell me what i need to change to put this view with 8 elements ( alreaday change view) in masonary style.

i put mt image style :

with 380 and no heigth

with Allow Upscaling

thanks


marta.oliveira's picture
marta.oliveira
Tue, 05/03/2016 - 16:46

hi

can you help me , please?

phuonght's picture
phuonght
Fri, 05/06/2016 - 00:26

Hi,

Please check your site. Our developer uses column boostrap and set 6 columns already.

You can change in sites/all/themes/md_make/templates/views/block/portfolio/our recent work, file views-view-unformatted--portfolio-our-recent-works-.tpl.php, customize "col-md-2" to number of column you would like. 

marta.oliveira's picture
marta.oliveira
Fri, 05/06/2016 - 03:33

Hi

thanks... thanks so much

Marta

Log in or register to post comments
Have More Idea?

We are here to build your website!

No Universal solution fits all special business requirements. Our experienced team is ready with ideas and state-of-the-art technical solutions to consult the best solution within your budget.