Is it possible to show and hide blocks of content in the trac wiki similar to the cloak macro of confluential?
It's a few month old but I was wondering the same thing.
Remy Blank answer put me on the right track, he was just missing an extra div.
{{{#!div
{{{#!html
<h3 class="foldable">Section title</h3>
}}}
{{{#!div
This is the section content.
}}}
}}}
If you look at the style sheet, it shows you which element gets hidden with the collapsed style.
.collapsed > div, .collapsed > table, .collapsed > ul, .collapsed > dl { display: none }
Remy's code was wrapping "This is the section content" inside a p markup, that's why it wasn't hidden.
If you just want to (temporarily) hide some content while keeping it in the page source, you can use the {{{#comment}}} wiki processor. As mentioned by bta, the content is still accessible by downloading the page source, so this is not a security measure.
If you want to collapse a section, and allow users to expand it by clicking, you can use the following trick (tested with 0.12):
{{{#!div class=""
{{{#!html
<h3 class="foldable">Section title</h3>
}}}
This is the section content.
}}}
This will show the section title with a small triangle on its left, and clicking the title will toggle the section between collapsed and expanded. The section will initially be collapsed.
I'm super late to the party, but the FoldMacroProcessorMacro lets you do this without resorting to HTML.
The current versions of Trac do not have permissions this fine-grained. User accounts can be granted wiki access, but it's an all-or-nothing setting. The raw wiki-format version of a wiki page can be downloaded in plain text using the links at the bottom of the wiki page, so a macro like this wouldn't really restrict content.
It's possible to write an add-on that blocks access to a particular wiki page based on user account name or permissions, but that's still page-level granularity and not block-level like the macro you mentioned.
Related
i am very confused right now. I came from Wordpress,and laravel frameworks, and now i am assigned to develop Joomla! project.I thought i can easily manage to create custom template in joomla. I have been reading a lot of articles and documentation. I've manage to create a template and display modules.
But now, i need to start digging the right way to display the content and manage it in Joomla! back-end.
Here's my problem. I have home page (Long page) and inner pages (Short page). Here's the structure of my homepage
<html>
... header links and other necessary tags
<body>
<section class="homepageonlysection1">
<div>
image and text here! (i made this as 1 modules in Custom HTML)
</div>
<div>
video here (i made this as 1 modules in Custom HTML)
</div>
</section >
<section class="homepageonlysection2">
<div>
form here (i made this as 1 modules in Custom HTML)
</div>
<div>
image and text here! (i made this as 1 modules in Custom HTML)
</div>
</section>
<section class="homepageonlysection3">
<div>
image and text here! (i made this as 1 modules in Custom HTML)
</div>
<div>
video here (i made this as 1 modules in Custom HTML)
</div>
</section>
</body>
</html>
and this is my inner pages
<html>
... header links and other necessary tags
<body>
<section class="innerpagessectiononly1">
<div>
Article Content (i will do as jdoc:inlucde type="component")
</div>
</section>
<section class="innerpagessectiononly2">
<div>
sidebar Content (i will do this as 1 modules in Custom HTML)
</div>
</section>
</body>
</html>
Those template are really different.
Problem 1 : How can i make my inner pages if my homepage structure is very different? Or
Problem 2 :How can i make display my section (homepageonlysection) in home page only and display (innerpagessectiononly) in inner pages only?
Problem 3 : Is there a Advance Custom Field (ACF for wordpress) as joomla extension ?
Please advice. Any help would be appreciated.
One thing I recommend is really digging into the core templates (both front and backend) to understand how things work. In particular Isis the backend template illustrates a number of complex options.
Now, overall I think you probably do not want to do the homepage the way you are doing it, since it will be very inflexible and hard to change. On the other hand it's possible that you want it inflexible and hard to change. In reality you may not need to have separate layouts at all or the differences may be minimal and may not require any special code at all.
So, first, this document explains how to determine if you are on the home page. So you can clearly pretty easily test for that and then enclose your two separate designs in the true and false conditions. This is basically what you see in Isis. In your case you can place one or more module position inside the condition. In fact you could make it so this layout does not even load a component. Then you can just make an empty article and make the home page a single article link to that empty article. (I would put that article into a separate landing page category)
A second option if you really want to have a totally different design on the home page is to make a totally separate template for the home page. If say you called this "my home template" and your other template "my everywhere else template" what you could do is make "my everywhere else template" the default and then on the default (homepage) menu item assign the "my home template" template. In this special template you can even use the module jdoc:include (instead of modules) to call specific modules in highly customized ways. I would suggest you go read the docs on that. You can even set the options and the chrome right in the template.
However, I think you are missing a key feature of Joomla. In your question you have not said what kind of menu link you are planning to use for your home page. The third option is that for the homepage you use the same template but a specific alternate layout that you use for this page. For your case what you would most likely want to do, assuming that you are not using the featured articles layout type anywhere else (i.e. that no articles are marked featured), is to make your homepage using an articles > featured menu link. Then you can assign all the modules you made to the home page via the menu modules tab. Depending on how your module positions are in the template it could just be that they will float up.
Your design is not a particularly unusual or complex however. Many Joomla homepages consist of multiple structured sections of text and media. These are made with menu types such as "featured" and "category blog." The advantage of using these menu types is that then you are storing your content in articles and these are much easier to manage. ALso you don't have to give someone access to the module manager in order to allow them to edit these snippets of content. So the fourth and possibly best approach is to use one of these standard content layouts. For example if you were to make a category called "home page content" and then put the content for each of the modules in a separate article and (assuming you want a consistent structure) put the image for each of them into the structured intro text image field, you can then make a "category blog" menu link to the "home page content" category as you default (home page) menu link. Then what you can do is make one or more layout override for those individual items that gives the exact layout you want. Assuming that they are all the same, you can select that as a alternate layout in your menu link. Actually even if they are not all the same you can just do a more complex layout instead of looping through the list and doing the same thing for each article, do each one separately.
A fifth approach is to use an alternative layout instead of an alternate layout. The difference there is that you would give the layout a new name (in either the category or featured view) and then you will have the additional flexibility of being able to create options in the menu link that are different than those for the normal category/featured views. It's up to you to decide what you might want to add there.
There are other options as well, because Joomla has a very strong template community and they like to have a lot of flexibility. But that will get you started.
It appears that the default behavior for the rich text editor dialog in Page Editor is to scroll the entire page back to the top. This creates bad UX on long pages, since after you're done editing, you have to scroll back down the page and figure out where the text is that you edited.
Anyone know how to make the page stay scrolled to where it was?
I am not sure if it is related, since I am not able to reproduce your problem, but it reminds me of a bug in the Sitecore client that showed up in Internet Explorer and Firefox versions, where the content tree pane would do the same (scroll up after interaction). Please take a look at this StackOverflow question for a possible solution.
Furthermore I want to give you the advice to build up pages in Sitecore using small building blocks (multiple hierarchical placeholders with small renderings). Only then you would be able to leverage the full potential of the system, regarding page editing features and personalization. Also, only then a content editor can alter the presentation in the Experience Editor (Page Editor for older versions). Putting long pages of HTML-code in a single rich text editor field isn't recommended.
I fixed it changing the positioning of the jqueryModalDialogsFrame from absolut to fixed:
#jqueryModalDialogsFrame{
position:fixed !important;
top:0px !important;
left:0px !important;
}
I just want text and hyperlinks, and not <p> tags. I have also had an issue when putting in a list, and each <li> gets a   put in front of it which is being recognized as a new paragraph.
Is there any way to stop the rich text editor from adding these in?
The Sitecore Rich Text Editor is configurable in a variety of ways. Internally it's an instance of the Telerik RAD Editor. Hence you can apply many of the same configuration strategies documented on Telerik's site to it.
A while back I wrote a blog post about how you can stop the editor form messing about with your HTML:
https://blog.jermdavis.dev/posts/2014/ever-wished-the-rich-text-field-didnt-mess-with-your-html
While that's not addressing your exact issue, the general strategy there for configuring the internal behaviour of the editor can probably be used to meet your requirements. The underlying editor has a series of filtering behaviours that you can enable and disable to help with your requirements. The "FixEnclosingP" and "ConvertCharactersToEntities" options might be of help here? They're documented on Telerik's website:
http://www.telerik.com/help/aspnet-ajax/t_telerik_web_ui_editorfilters.html
There are also other strategies, such as post-processing the HTML that's saved by the editor. Sitecore's SaveRichTextContent pipeline might be of help here? This blog post might offer you some ideas about how that can be used:
https://techmusingz.wordpress.com/2014/06/14/wrapping-rich-text-value-in-paragraph-tag-in-sitecore/
I am developing a template for bigcommerce site, where i want to show category list and some hard code links in the place of Page menu. Now what i do, just place this %%Panel.SideCategoryList%% in the upper navigation area. Which shows category list right.
But the problem is that i didn't find this %%SNIPPET_SideCategoryList%% file. (In snippets folder exist a file with this name, but that file doesn't work even if i remove all contents of that file.)
I had a similar issue with SNIPPET_SideShopByBrandList.
I logged a ticket and got the following response:
Thank you for contacting BigCommerce technical support.
I see its reference in SideShopByBrand panel. In the same panel, there is another SNIPPET_ShopByBrandAllItem which is visible in snippets tree, but not this one. That's because its a hidden snippet, and its not possible to edit this.
I have tested this in my personal store as well, and the output is same. let me know if you have any other questions.
I think yours might also be a "hidden snippet and not possible to edit"
No worry....You need to just create html page and put the below code but keep one thing don't include the html, head, body etc
1) just create a html page and delete the html content
2) put the below my code for
3)
<li class="%%GLOBAL_LastChildClass%%">%%GLOBAL_CategoryName%%
%%GLOBAL_SubCategoryList%%
</li>
I would like to add a button to the Sitecore rich text editor toolbar, specifically one that inserts the H2 element.
I know the H2 element can be inserted using the paragraph styles pulldown menu, but all my editors are now using the bold button for their headings because they don't "see" the paragraph styles pulldown. So, I want to make the H2 easily available using a toolbar button. (And maybe even removing the bold buttons, since it's not semantic at all.)
But no matter how I go through the documentation, I cannot find a good explanation on how to do this.
In addition to the guide Yan posted, here's another guide.
I found a couple of walkthroughs for this...
Sitecore v6.3 and previous: link
Sitecore v6.4: link
Make sure that you select the core database (bottom right of Sitecore desktop) so that you can see the /sitecore/system/Settings/Html Editor Profiles area.
In my article here the first step of wiring up an event to a button is in javascript. From there you can insert text or tags. You can also get the selected text and wrap it in tags. You don't need to compile anything I was just showing how you would if you needed to, but you can entirely cut that piece out and just use the editor to send whatever text you want back to the wysiwyg editor.