Extensis Logo SUPPORT | FORUMS | KNOWLEDGE BASE

Create a page for a specific custom field


#1

Hi all,

I’m new to this Portfolio NetPublish stuff as I’ve just taken over from a former member of staff.

My question is, is it possible to create a page that lists options from a custom field value, for example. I have a custom field called Languages, within this field there are 5 options, English, German, French, Italian and Spanish, what I want to do is list these 5 options as links within my NetPublish site for users to click on and the subsequent page will only show the images that have been tagged with that language. Hope that makes sense.

Thanks in advance.


#2

Hello,

Yes this is possible. I’m not sure what template you’re using, but let’s assume you’re using ImagePro.

  1. Create your custom field with the predefined list in Porfolio Desktop Client
  2. Go to Catalog->Netpublish to open the Netpublish assistant
  3. Once you get to the Search page options, select the page style that you want in the left column
  4. Put a check in the box next to the custom field from step 1
  5. Click on ‘Search Operators/Options’
  6. In the dialog that opens, select ‘Pull-down for pre-defined list’ under ‘Data entry options’, then click ‘OK’.
  7. Set up the remaining pages (Results, Details, etc…), then publish the site

That should do the trick. This should work with the other templates as well.


#3

Exactly what I was after, thanks.


#4

An additional question from the one above, is it possible to have a further search box embedded within this page to only search the results returned, so from my example above, I’d want to search within English or within French etc.

Thanks once again.


#5

That might be possible, but I don’t have the expertise to show you how. Maybe someone else reading this thread has an answer.

[quote=“Scott1”]An additional question from the one above, is it possible to have a further search box embedded within this page to only search the results returned, so from my example above, I’d want to search within English or within French etc.

Thanks once again.[/quote]


#6

Short answer ‘No’ - certainly not by using just the NP Assistant UI settings.

To query within current query results, you can add an additional query term to the existing NP query**. Realistically that mean adding one more ‘AND’ (i.e. restrictive) query term. In addition you’ll need to write your own templates/NP code. Whilst that’s ‘just’ HTML/CSS/JavaScript (NP server-side code is JavaScript-based) whether it’s easy depends on one’s level of comfort with those tools.

** It’s not clearly documented by NP (like Portfolio) doesn’t support complex queries. Multiple query terms - 5 via the UI/ more if you code your own - can be used but are parsed in a strict left to right form. Nested queries, e.g. A AND (B OR C), are not possible.

Put another way, it’s doable but probably more expensive in time/cost terms than non-tech management might intuit (or so has been my experience - YMMV). Before embarking on custom code in this area, I’d make certain the ‘re-query’ does what you want and doesn’t need more complex querying or it’s wasted effort (been there, done that…).


#7

Ok, cheers chaps.

Warning! This is me thinking out loud -

Could you not embed another advanced search within the results page, populate a hidden field with an option from the custom field, in my case, the Language custom field and then allow the user to search on for arguments sake, the Title?


#8

That sounds familiar. for instance, server-side code in the Result template head can parse out the existing query parameters and thus auto-populate a form embedded in the result HTML page which can include the control for the extra parameter.


#9

Thanks for the help.

I got it working. All I did (seems obvious now) was to embed like previously mentioned an advanced search within the results.np template and then from there use an if statement and sniff out a parameter in the URL ‘(Request.getParameter(‘value’)’. From there I was able to pre-populate a hidden select box but I guess any field type would do the same job and then only allow the user to search on the Title field.

Scott.