September 25, 20241 yr Hi all, I'm a beginner - I adapted a portfolio website for my film-making stuff, so I only half know what I'm doing. I have a datafilter so you can sort my projects by various titles, like 'corporate' or 'music video' for example and see only those projects. Is there a way to send someone a link so that when the page loads it has a certain filter applied? Like if I'm going for a corporate job, can I send them a link that will open to the page with the filter set to showcase my corporate work? Currently it defaults to 'all'. I've tried anchor links, obviously that doesn't work. It's complicated by the fact that I simply added to existing code and it worked, but I don't really understand the underlying mechanism. This is the code that makes it run; Many Thanks for any help. <div class="col-lg-12"> <ul class="portfolio__filter"> <li class="active" data-filter="*">All</li> <li data-filter=".corporate">Corporate</li> <li data-filter=".mvid">Music Video</li> <li data-filter=".director">Director</li> <li data-filter=".editor">Editor</li> <li data-filter=".actor">Actor/Presenter/VO</li> <li data-filter=".writer">Writer</li> <li data-filter=".composer">Composer</li> <li data-filter=".vfx">VFX</li> </ul> </div>
September 25, 20241 yr Yes you can. You can add a URL query to the link. You then write a filter function on your site to pull the query and apply the filter. The code you provided is only part of the process. There will be a JavaScript function that does the actual filtering. The simpler solution for you would be to just create a set of pages for each of your genres.
September 26, 20241 yr Author Thanks fisicx, that gives me an idea where to start digging. Half the battle is just knowing the names of the stuff I need to start researching. Cheers, M
September 26, 20241 yr You would still be better of with separate pages. That way you can add an introduction and excerpts for each portfolio item. each portfolio item then links to a new page where you have the full description, stills, videos, making of, testimonial etc. A good portfolio can take weeks to fully develop, test and optimise.
September 26, 20241 yr Provided you take steps to avoid cannibalisation - the separate page approach that fisicx suggested can help with SEO and bringing in organic traffic. If you've got a well optimised page for wedding videography, for example, it'll serve you better than filters & links will PS - what cameras are you using atm? I've just picked up a Sony A6700 and am really enjoying it for video, particularly in HLG
February 14Feb 14 Yes, you can do this by using URL parameters. You add a query string like ?filter=corporate to your page URL, then use JavaScript on page load to read that parameter and apply the corresponding filter. This way, the page opens with the selected category already active. For beginners, creating separate pages for each category can be simpler and better for SEO, but the URL parameter approach works well if you want to keep a single portfolio page.
Create an account or sign in to comment