We have a wiki page in MediaWiki with instructions like this:
complete instruction 1
also in case A do this
complete instruction 2
also in case B do this
complete instruction 3
etc
Is there a way to show just the lines / paragraphs in which we are interested? E.g. someone could show all rows or hide certain rows, preferably at the touch of a button.
I assume it is some combination of tables, ToggleDisplay and templates but I don't know more than that. Any else know?
One possibility is to put each section in a template like this: Template A; Template B; Template C; Template D.
Then have two pages (with links between) where say, page 1 is {{Template A}}{{Template C}} and page 2 is {{Template A}}{{Template B}}{{Template C}}{{Template D}}.
But that's not elegant - any better ideas?
I have not tried it but maybe you could use Collapsible tables and build your instructions as a two column table like the second one shown under Simple Example
Looked a little further how about the NavFrame I know it is deprecated but I think it might be able to handle what you want?
Related
I got a lot of visits to my site main page from different keywords. Examples of format might be as following:
/?keyword= train hard
/
/?keyword=
etc., etc.
To be able to sum up all visits to my main page despite from the keyword, I wanted to use a Regex like ^/$. However, that didn't work out. What RegEx should I apply to get the proper result?
What RegEx should I apply to see other sections of my website in a similar way? E.g.
/booking?keyword= or /section?keyword=any ?
Thanks in advance!
For main page you can try: ^\/(?:\?keyword=.*)?$
Look here for example: https://regex101.com/r/5uCFun/2
For other pages similarly: ^\/booking(?:\?keyword=.*)?$
Example here: https://regex101.com/r/1dAaHL/2
For the Mediawiki template {{Special:RecentChanges}}, I know you can control the number of pages shown. If you wanted to show only the last 10 pages, the code would look like this:
{{Special:RecentChanges/10}}
Does anyone know if there are parameters other than the number of changes that can be used? For example, I'd like not display some of the links (e.g. contribs, block, rollback, etc.).
I can't find any documentation anywhere.
Additional parameters may be used in a comma separated list such as:
{{Special:RecentChanges/days=5,limit=40}}
days
limit
hidebots
bots
hideminor
minor
hideliu
hidepatrolled
hideanons
hidemyself
More http://www.mediawiki.org/wiki/Help:Recent_changes
i´m developing a theme and for some reason i need to move the default position for breadcrubms (also for many other things) over woocommerce themes. Then i realised to do something like this on my functions.php:
function woocommerce_remove_breadcrumb(){
remove_action( 'woocommerce_before_main_content', 'woocommerce_breadcrumb', 20);
}
add_action('woocommerce_before_main_content', 'woocommerce_remove_breadcrumb');
function woocommerce_custom_breadcrumb(){
woocommerce_breadcrumb();
}
add_action( 'woo_custom_breadcrumb', 'woocommerce_custom_breadcrumb' );
And then on any template file, output the breadcrumb just with:
<? do_action('woo_custom_breadcrumb'); ?>
And works. My question is more than that. Is this the correct approach for something like this? I mean for anything over woocommerce, not just breadcrumb, for any pice, ratings, titles, buttons, sidebar, and so on.
What i´m thinking on is why woocommerce templates don´t come with more deep code. I mean, why there´s no such a single-content-loop.php template where you can just change the order of things, title, category, content, images, etc. in an easy way rather that hooking into functions?
I think that is an acceptable way to call the breadcrumbs explicitly. Sometimes it is easier to call a specific function than remove everything around it!
As for changing the order of things and getting into advanced customization; there isn't a single file, but a number of files working together. Create a folder in your themes root called 'woocommerce' and copy the following files for a safe override:
woocommerce/woocommerce-hooks.php:
Here are your hooks, including the ones you are overriding in your themes functions.php. Here is where you can experiment with removing and repositioning certain elements on your product page. Search for 'Sidebar' and you will see where the 'woocommerce_sidebar' action is added with the function it references in...
woocommerce/woocommerce-template.php:
Here are the functions used in template files to output content based on conditional statements. For instance, search for the 'Single Product' series and you can see which template files are used for which functions. For instance 'woocommerce_template_single_title' uses 'single-product/title.php' - if you copy over this folder and file you can make very specific edits to just the title section
Between these two files and their accompanying references (like title.php) I believe you can do the things you described. Let me know how it works out! I'm new to woocommerce too!
I have a page template in Tridion 2011 with Razor code that prints information based on RenderComponentPresentation() as the first thing in the page. No other markup comes before it, because the component, not the page, contains the initial markup. Unless I put at least one character before the first RenderComponentPresentation in the published output, the template refuses to render any presentations.
So, for example, if this is all that is in the layout TBB this works (in my real code the tcms are real of course):
<
#RenderComponentPresentation("tcm:mytcm","tcm:myothertcm")
but this does not
#RenderComponentPresentation("tcm:mytcm","tcm:myothertcm")
The first prints the contents of the component preceded by the "<", whereas the second does nothing at all. I don't want to have ANY markup directly at the start of the page template, I want the first thing to be the component. Is it possible?
I've just done a quick test in Template Builder using the latest version of the Razor Mediator (1.2) and couldn't replicate your issue.
Maybe you could try:
<text></text>
#RenderComponentPresentation("tcm:mytcm","tcm"myothertcm")
It won't render any additional markup but may trick the mediator into doing what you want (though like I said, I can't replicate your problem so can't verify whether it does).
Normally with Razor you iterate over any and all Component Presentations on the page, and right now I'm working with
#foreach(var cp in ComponentPresentations){
#cp.RenderComponentPresentation()
}
This will render every component on the page, regardless of predefined schema's or templates. Your issue however suggest a problem elsewhere. What kind of output does your page template generate (do mind its the page template using a compound template which in turn includes the Razor TBB you describe here). Is it .aspx, HTML or other? And what is the Component templates' output? is it an HTML fragment, or anything else?
As far as you syntax goes, that should be just fine other than the template invocation:
#RenderComponentPresentation("tcm:x-xxx-xx", "tcm:xx-xxx-xx")
I have a feeling this code only works when used within HTML tags, though, but that's just a hunch.
Bit of a hack but have you tried:
<text>#RenderComponentPresentation("tcm:x-xxx-xx", "tcm:xx-xxx-xx")</text>
or
#Html.Raw(RenderComponentPresentation("tcm:x-xxx-xx", "tcm:xx-xxx-xx"))
Disclaimer: not really used Razor mediator. Just Razor.
I know the Confluence wiki pretty well, and I like much the natural hierarchy of pages you get there. I have to use now a Trac wiki (which is not that bad, same root as MoinMoin), and am searching the feature here. What I want to reach:
Edit the page "MyPage" and enter there the link to a page you want to be a subpage, eg. MySubPage.
The link should be similar to /MySubPage or [/MySubPage]. The character "/" denotes that the resulting page should be a subpage of the current one.
Follow the link, create the new page with some content.
You should now see, that "MySubPage" is a subpage of "MyPage". You could reach the subpage from anywhere by the link MyPage/MySubPage.
The MoinMoin wiki has that feature at least from version 1.5.x, and I have used that regularily. Is there something similar in Trac? Do I have to install then a plugin?
Thank you a lot
Markus
Well, not the best thing to answer the own question, but just something I found out.
* SubpageFirst
* SubpageSecond
* SubpageThird
* SubpageFourth
leads to (of course) four pages, but when you have a look at them in Title Index, you will see:
* Subpage
* First
* Second
* Third
* Fourth
Not what I have searched for, but comes near.
The only way I have found to do something like this is to specify the full path to the page. For your example this would be [[MyPage/MySubPage]]. You then get a hierarchy in TitleIndex, but it leaves much to be desired in terms of presenting a Parent/Child relationship.
I think, as retracile mentioned, that MyPage/MySubPage does not create a true hierarchy, but rather just a page containing a forward slash in the name, and in TitleIndex the pages are presented such that they appear to be in a hierarchy (but often do not display the way you would like; as I mentioned it leaves much to be desired).
Parent-child wiki pages aren't directly modeled in Trac. Essentially, "/" is allowed as part of a wiki page name.
You should be able to create a macro that does something like what you want; essentially:
[[sub(MySubPage)]]