Once we create a New Schema in DXA Tridion web 8/8.3/8.5, if we are facing below Issue , Please refer below notes how to resolve the same:
A problem occurred while rendering this section
Semantic schema '1306' not defined in Localization [25 ('English')]. Check that the Publish Settings page is published and the application cache is up to date.
Means Schema is not registered in Schemas.json file: Go to your local setup of application for.e.g:
D:\GitHub\SDL-Web\Sdl.Showcase.Web.Site\Site\BinaryData\25\sdl\system\mappings
So need to refresh the same:
Run the website: localhost: 8090/admin/refresh
- check the time stamp of schema.json file in BinaryData\25\sdl\system\mappings – if succeeded it’s fine otherwise
Stop to application, Delete the Binary Folder – then restart the application – It should create folder 15 and then access your page and it should create folder 25 with the latest jsons and check the 1306 available or not… then you are good to go
How to add the SuperScript for RTF and Non-RTF Fields in Tridion
For Non RTF Fields:
We have a provision to add the superscript in Title/Subtitle/Link Title
We need to inject the <sup></sup> html code in the text of any given field and we need to retrieve the same by using @Html.Raw (Modal. Title) – This change need to be applied across all the views where ever the above fields are being used – But this will be a big change since we need to identify where the above fields are being used in the views and we need to update the same
e.g.
Output:
For RTF Fields: E.g.: Description Field
Already CMS is providing a default set of superscripts that can be embedded to any text where ever we require to add the same. If needed we can add more no. of superscripts as well apart from the existing one into the CMS i.e. in below files
Tridion\web\WebUI\Core\Controls\FormatArea\FormatArea.css
drop-proprietary-attributes: true to false
Use of Key-Value Pair in Tridion and its Re-usability
We have a Situation where we are using no. of Tables like rows and columns in a single page, and which have multiple tables in a single components in same page.
We have use simple approach like creating a table in RTF field and update the content but this don’t give the flexibility to Content Editor either to edit any content or to add any extra rows/columns for a table. In this scenario the best approach is using a Key-value pair schema’s to achieve the same.
For e.g.: Creating Tables DXA using Key-value pair schema
We have 2 different types of tables in this HTML
- For first table we are using Tables Schema – This schema uses TableFields EMB (Embedded) Schema – in turn it uses another EMB schema called Key Value Pair Schema to retrieve the name and values of the table.
- For the second one we are using Table BSC Schema – This Schema uses Row Column Values EMB
- In order display the multiple tables in single component – we are using Table List Schema – here we are embedding above two schemas (Tables and Table BSC) as a Component Link (CL) Schema.
Please refer the Mapping for the above schema’s in the excel sheet which gives more clarity.
Since we are having different tables sections we have to create individual Component Templates according to our requirement but – below are few listed CT’s that I have created
- Base Table (table-bottom) – In order to display we used TableWithBottom CT
- Base Table (table-borderd) - In order to display we used TableWithBordered CT
- Base Table (table-borderd + table-striped + table-condensed) - In order to display we used TableWithBSC CT
Note: For this, the html provided is displayed the table is on row basis but this is not a good practise since editor will get confused while filling the data hence we have made the changes in html to display based on column basis so that it’s easily understood
- For displaying the List of tables side by side in a single component we are using below CT’s
- Table in Grid (-sm6) - In order to display we used Table In Grid sm6 CT
- Table in Grid (-sm8) - In order to display we used Table In Grid sm8 CT
By this way Content Editor can’t depend on any developer to change /Edit any content or add/delete any extra rows for the tables as per his requirement.
How to add a self-Link for the Component
There are many situations where we need to have self-links to component while we are displaying any content for e.g.: we have a news Article where will have some part of content shown and will give a link to Moreinfo, once we click on the link it will take you to Detailed Page.
In order to achieve the same: we can use a self-link in the Model so that it will automatically generate a link while which can be used while writing the Component Templates.
[SemanticProperty("a:_self")]
public string Link { get; set; }
How to handle the “Resource Values” - i.e. for e.g.: if have button “moreinfo" - that text needs to be localized how you handle and what you need to do?
Generally most of them will hardcode such kind of buttons , but it we are using multi lingual sites, then if we want to localize we will face issue at that time, in order to overcome we can use the concept of resources which is a in-built feature available in Tridion
@Html.Resource () ->Publish the Settings Component and Refresh the Web Application
The resources are published to the Web Application in JSON format and can be located at: webapp\Site\BinaryData\system\resources\
Updating the Module Resource component – where we can add the attribute “moreinfo” in the above comp. so that when we want to localize the same in diff.lang it will be easy to handle.
After that Publish _System/Publish Settings Page and Refresh the Web Applications