Developer forum

Forum » Feature requests » File patterns
Tomas Gomez
Reply

Hi,

We have a project with some thousands of products. Every productt has its unique ID that is used to name its associated files: Related images, instruction set, etc.

The management of Image patterns in DW is great. We have configured them and they have avoid us lots of work.

What about File patterns? It could be possible to configure File patterns for the products? As there may be different types of documents, there should be the option to create different patterns (ie. "Handbook", "Technical specifications") . This way, it would be easy to associate the files to the products in the templates or wherever they were needed.

Regards,
Tomas

 


Replies

 
Nicolai Pedersen
Reply

I think you can use an image pattern for documents. Just use another extension...

 
Stephen Anthony Jackson
Stephen Anthony Jackson
Reply

Hi Nicolai. 

Could you elaborate on that?

I have been trying to find a way to make a file pattern for product datasheets

 
Stephen Anthony Jackson
Stephen Anthony Jackson
Reply

Hi Thomas.

Did you find a solution to this? I have a similar situation

 
Michael Knudsen
Reply

I assume your datasheets are placed in a asset category, and on the asset category it's possible to specify a auto-checkin search pattern (just like image patterns).
Check out the documentation: https://doc.dynamicweb.dev/manual/dynamicweb10/settings/areas/products/assets/assetcategories.html?q=asset%20categories

Br. Michael Knudsen

 
Stephen Anthony Jackson
Stephen Anthony Jackson
Reply

I'm on dynamicweb 9

 
Stephen Anthony Jackson
Stephen Anthony Jackson
Reply

Hi Michael. 

So I created an asset category for the datasheets exactly as stated in docs here https://doc.dynamicweb.com/documentation-9/pim/other/automatic-digital-assets-handling ( giving it an autocheckin pattern of  {ProductNumber}-Datasheet*, Primary Image Rule = True, Postfix = True, -1 (dunno what this is but its in the documentation)

I copied a datasheet and named it 12345-Datasheet.pdf and placed it in both the Files/Files and the Files/Images folders, cos I was unsure where they should go (the docs are a bit hazy on that)

But when I come to the part where you make a scheduled task, there are no asset categories in the box that can be selected. The box is just empty, so I dont think the scheduled task is adding the asset to the product when I run it

 

 

 
Stephen Anthony Jackson
Stephen Anthony Jackson
Reply

Actually I found the issue! The Asset categories dont appear until after you first save the task and refresh it. A little like when you have to save a product for the first time to be able

to see the product category fields.

So now the task worked, and the pattern worked. 

Thanks!

 
Stephen Anthony Jackson
Stephen Anthony Jackson
Reply

Heres a big ask though. Is it possible to use product category fields in the patterns? You can use custom system fields, but I would really like to use the product categories.

I want to for example have a pattern like

{ManufacturerID}-{Horsepower}-{ProductNumber}-Datasheet*

Where Horsepower is the power output of an engine produc

Cheers

//Steve

 
Michael Knudsen
Reply

Hello Steve,

- it's not possible to use Product Category fields in patterns.

BTW: feature requests should be created on GitHub (https://github.com/dynamicweb/DynamicWeb) so I'm ready to up-vote your request on allow product category fields in patterns.

Br. Michael Knudsen

 
Stephen Anthony Jackson
Stephen Anthony Jackson
Reply

Ok thanks, Michael.

I have one more question

When using the pattern matching using asset categories, I noticed you cant add a presentation name, like you can when you use the manual allocation method.

So you only ever get the filename presented rather than for example just "Datasheet" with the filename hidden behind it. 

Is there a way to set this in the asset pattern / scheduled task, or do I have to do a db query each time to update the auto-checked in assets to have a display name that our customer prefers?