# Customize Data File param with Page .Params

**URL:** <https://discourse.gohugo.io/t/customize-data-file-param-with-page-params/5615>\
**Category:** support\
**Created:** [February 26, 2017, 12:22pm UTC](https://discourse.gohugo.io/t/customize-data-file-param-with-page-params/5615 "2017-02-26T12:22:16Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![anqa](https://avatars.discourse-cdn.com/v4/letter/a/8491ac/32.png) [@anqa](https://discourse.gohugo.io/u/anqa)\
**Post date:** [February 26, 2017, 12:22pm UTC](https://discourse.gohugo.io/t/customize-data-file-param-with-page-params/5615/1 "2017-02-26T12:22:16Z")

</div>

Hi, I would like to call different Site data File using page .Params.

I have data file like:  
foo/category/filename/filename.md  
foo/category/filename2/filename2.md  
foo/category2/filename/filename.md  
foo/category2/filename2/filename2.md

I can call it in type/single.html in partial like:

`{{ $foo := $.Site.Data.foo.category.filename }}`  
and range through it:  
`{{ range $foo }} {{ partial "photo-gallery" . }} {{ end }}`

I would like to customize and call different data file depending on page .Params,  
I figured out that I can customize it like:  
in [page.md](http://page.md) file:  
`myvalue: "filename"`  
and I can call it using:  
`{{ $foo := index $.Site.Data.foo.category Params.myvalue }}`  
and it works  
but I would like to customize in page params category name too, like:  
in [page.ms](http://page.ms) file:  
`myvalue: "category/filename"`

and try call it like:  
`{{ $foo := index $.Site.Data.foo Params.myvalue }}`

how can I achieve it?  
I’m beginner with hugo so I’d be grateful for help 🙂
