sachatrauwaen / OpenContent

Structured Content editing for DNN (Dotnetnuke)
46 stars 25 forks source link

Portal Name in DetailMetaTitle #72

Closed mikesmeltzer closed 5 years ago

mikesmeltzer commented 5 years ago

When defining the detailMetaTitle within the manifest file for multi-item templates it appears that you are unable to inject the portal/site name.

Example:

"detailMetaTitle": "{{PortalName }} | {{PostTitle}}"

Is there a token available to be able to do the above?

Thanks

sachatrauwaen commented 5 years ago

Hi, actually portal name is not available. You can get for exemple {{Context.PortalId}}

To see all available varables, you can activate logging in the global settings and look at the model in the browser console.

But, thats maybe something i can add .

mikesmeltzer commented 5 years ago

Thanks Sacha.

I think this variable would be very valuable to eventually add so that you do not have to hardcode the sitename in the manifest or pull it from a variable/setting that would need to be updated in potentially multiple places depending upon the type of site you are building.

Timo-Breumelhof commented 5 years ago

To Razor or not to Razor :-)

Timo-Breumelhof commented 5 years ago

Maybe a DNN helper would be better? {{Dnn PortalName}} so you can add others too? (in later stage)

sachatrauwaen commented 5 years ago

@Timo-Breumelhof In detailMetaTitle razor is not supported. A dnn helper sound like redirector to other variables. Why not directelly access to the variables.

I start by adding PortalName to the Context.

Timo-Breumelhof commented 5 years ago

Ok, just asking: wouldn't it be "better / more logical" to add Portal.Name to the context?

sachatrauwaen commented 5 years ago

Included in v 1.4.2