Documentation to create custom content type and display it in theme in Orchard Core CMS - content-management-system

I have created a content type named "Button" in Orchard Core CMS using the admin. But I am now stuck. I am not sure how to display the content type "button" in my theme. I cannot find the documentation anywhere. So I instead created a "Button.liquid" file in my views folder of my theme project. In the liquid file I have the following:
<button>{{ Model.ContentItem.Content.TitlePart.Title }}</button>
In my "Layout.liquid" file, I have the following:
<div class="d-flex">
{% shape "button" %}
</div>
The idea is to have a button with some text appear in my theme. But this is what I have:The current state of my navbar with button
The text does not appear. Please help. I am new to Orchard Core CMS. I just need to know how to render/display custom content types in my theme.

Related

Unable to add anchor link <a id=""></a> on RTE AEM

On the custom component we built, we are not able to add <a id=""></a> in RTE by adding anchor. However, anchor link works fine on template level, but not WCB edit mode.
I compared CRXDE Lite between page and template and the only difference is the tag:
As you can see in the second screenshot, tag is not able to get generated when anchor link is configured. I tried to manually add to CRXDE Lite on the node, then anchor link shows up on the page. So I am guessing there might be some JavaScript code that prevents the to get generated.
What makes it strange is that for both template level and page level, they are using the same richtext component. Why would anchor show different outcomes?

In TinyMCE 3, how can I remove a field from the table dialog?

We would like to alter the appearance of the "Insert/Edit Table" dialog in TinyMCE. Presently the dialog displays fields which manage attributes that are deprecated in HTML5. For instance, the border attribute is considered obsolete.
Now, I can successfully remove the border attribute from the rendered markup, by extending a technique presented here:
http://krompaco.nu/2010/05/alter-default-initoptions-for-tinymce-in-episerver-6/
But the "Insert/Edit Table" dialog still presents a "Border" field when we launch the table dialog from the TinyMCE menu button. The toolbar option for TinyMCE enables programmers to control the actual buttons that get displayed by the editor.
https://www.tinymce.com/docs/configure/editor-appearance/#toolbarn
We still want to display the Table button, but want to remove some of the deprecated fields from that dialog. How can we do this?
We are using the EpiServer CMS (versions 8-10) which employs TinyMCE version 3.3.9.3. Thanks for your help.
You could probably use virtualPathMappings. I think they're still supported in CMS8-10.
This means you have to create a copy of the aspx or ascx file with the dialog in it. Have the file Inherit="" from EPiServer code and change the markup how you want and then add the below configuration in section of web.config:
<virtualPathMappings>
<add url="~/yourprefix/CMS/Edit/LinkDialogName.ascx" mappedUrl="~/YourProjectFolder/LinkDialogName.ascx" />
</virtualPathMappings>
This is a bit of a hack however.

Content not showing in front end

Using Typo3 6.2.19 with themes (theme engine), themes_gridelements, theme_bootstrap.
I choose default theme on front page. Then added text element in main column. But it's not showing in front end.
To show the contents on the frontend of your site, make sure you included the css_styled_content to your template.
Goto Template -> Edit the whole template record -> Include. Here you have the possibility to include the css_styled_content.

Tumblr: add pages to custom theme

I am creating a custom theme with HTML and want to create a navigation menu for my pages. I am not sure how to do this however.
I have tried to add:
{block:HasPages} {/block:HasPages}
and
{block:Pages} {/block:Pages}
but nothing appears.
Do I just have to hard code the links into the theme? Is there no way to do this dynamically?
You must have one or more Custom Page(s)
Each Custom Page must have Show Link enabled
The code block to show links to the Custom Page(s) is as follows:
{block:HasPages}
{block:Pages}
{Label}
{/block:Pages}
{/block:HasPages}
Code per the Tumblr HTML Guide.

Component without a dialog won't display in Sidekick

If a component is created, but a dialog.xml file isn't included within it, it will not show as available within the Sidekick, even if enabled in Design mode, and with a Component Group specified — why is this?
If you add a cq:editConfig node to the component it will show up in the sidekick, after being enabled in the design dialog of the parsys, without having a dialog.
As reference: http://dev.day.com/docs/en/cq/5-3/developing/components.html#Components and their structure
dialog boxes are meant for dynamically adding content to the components.
if there is no dialog box in a component there is no reason for component to display in sidekick .
u can directly hard code the component like this.
<cq:include path="par0" resourceType="/apps/...." />
Have you gone into the design portion to allow your component? I've often created a new component, and been unable to add it simply because I forgot to allow it in the design mode on that page.
EDIT
Good point - I do believe a dialog.xml file is required for it to show up in the sidekick. Otherwise you have to hard code the include of your component where you need it. I would suggest adding a dialog.xml file, even if it is only for the reason of showing it in the sidekick, so you can add it dynamically to different pages.