Developer forum

Forum » Feature requests » Website settings from "Item Type" in paragraph

Website settings from "Item Type" in paragraph

Anders Ebdrup
Reply

Hi Dw,

 

It would be very nice to have access to the values from the websites settings in the paragraphs.

Right now they are only accessible on page level.

 

Please output the custom values from the item type - e.g.:

<!--@Item.Area.Id-->
<!--@Item.Area.Js_Datoformat-->
<!--@Item.Area.Js_Language-->

 

Best regards, Anders


Replies

 
Mikkel Ricky
Reply
This post has been marked as an answer

Great idea! We've just implemented this and it will be available in the next hotfix release.

Best regards,
Mikkel
 

Votes for this answer: 1
 
Lars Larsen
Reply

Will the tags also be available in paragraphs outputted by modules?

 
Nicolai Høeg Pedersen
Reply

Everywhere in paragraph and module templates.

 
Lars Larsen
Reply

Sounds just perfect, thanks :-)

 
Jesper Holm Damgaard
Reply

Mmm, maybe I was a bit to fast with that +1 there :)

 

Has anyone had any luck making this work? It doesn't seem to work no matter what I do... The tag doesn't render and it doesn't appear in DwTemplateTags either.

 
Anders Ebdrup
Reply

No, I have not had any luck with latest version 8.2.3.7

 
Jesper Holm Damgaard
Reply

Got it working. Back on +1.

 
Mikkel Ricky
Reply

The preview release of our new Solution Set [http://solutionset2013.dynamicweb.dk/] makes extensive use of this functionality and it works like a charm.

Can you provide details on where it does not work?

Best regards,
Mikkel

 

 
Jesper Holm Damgaard
Reply

Works just fine for me in version 8.2.3.7 - Sweet stuff!

 
Anders Ebdrup
Reply

 

Original message by Mikkel Ricky posted on 01/08/2013, 12:57:

The preview release of our new Solution Set [http://solutionset2013.dynamicweb.dk/] makes extensive use of this functionality and it works like a charm.

Can you provide details on where it does not work?

Best regards,
Mikkel

 

Hi Mikkel

 

I have sent you an email as I have the problem on a (yet) non-public site

 

Best regards, Anders

 
Jesper Holm Damgaard
Reply

If the item tags are global, they should probably be available in the navigation XML? Right?

 
Anders Ebdrup
Reply

 

Original message by Anders Ebdrup posted on 01/08/2013, 12:57:

 

Original message by Mikkel Ricky posted on 01/08/2013, 12:57:

The preview release of our new Solution Set [http://solutionset2013.dynamicweb.dk/] makes extensive use of this functionality and it works like a charm.

Can you provide details on where it does not work?

Best regards,
Mikkel

 

Hi Mikkel

 

I have sent you an email as I have the problem on a (yet) non-public site

 

Best regards, Anders

The Item tags are not outputtet by the "DwTemplateTags" in a paragraph, but the values are replaced in the paragraph - so no problem, but it would be nice to have it outputtet together with the DwTemplateTags in the paragraphs.

 

Best regards, Anders

 
Gaetan Di Caro
Reply

Hello,

Sorry to unearth such an old thread, but I cannot get this to work. I want to use custom website settings on ecom templates.

When I put this on the page, I get the value correctly (it also appears in the templatetags) :

@GetString("Item.Area.MySetting")

But when I copy/paste it inside my module template, I get an empty string. I've tried outputting the value directly, assigning it to a string variable before outputting it, and even use the html syntax, but no luck.

Is there something I'm missing ?

 

Thank you !

 
Anders Ebdrup
Reply

Hi Gaetan,

 

Do you use Razor-templates or regular DW-templates?

 

Best regards, Anders

 
Gaetan Di Caro
Reply

Hi,

I use Razor templates in this case. That being said, I have tried to use an html template to check if the problem was tied to this, and then the tag simply isn't translated at all, it displays like that in the page :

<!--@Item.Area.MySetting-->
 
Anders Ebdrup
Reply

Hi Gaetan,

 

You should use the api instead as this:

@Pageview.Area.Item["MySetting"]

 

Best regards, Anders

 
Gaetan Di Caro
Reply

It works, thank you !