I have set up an internal MediaWiki site to build a knowledge base for our internal team. Currently I want to set up one category of articles and expand on that if it is well received.
I am brand new to MediaWiki & wiki's in general and I am struggling through the documentation to achieve what I want.
What I would like is navigation on the side panel for high level categories, which would then take to a page that lists out all the articles in that category. Each document created in the category would have a template with headings to fill in (i.e. "Executive Summary, Problem Summary, Details, etc"). When a user creates a new document in Topic1 they would be presented with a prefilled page and expected to fill in information under those headings.
Is this possible to set up or am I using the wrong tool to do so?
What I would like is navigation on the side panel for high level
categories
For this you would edit MediaWiki:Sidebar (in all built in skins. If using a custom skin, things may look different).
Each document created in the category would have a template with headings to fill in (i.e. "Executive
Summary, Problem Summary, Details, etc"). When a user creates a new document in Topic1 they would be
presented with a prefilled page and expected to fill in information under those headings.
There are a few different extensions that provide that kind of functionality, like e.g. Extension:NewArticleTemplate and Extension:NewArticleTemplate. With those you can give users that create a new article a default template to work with:
{{My Template
| Executive Summary = write yout sumamry here
| Problem Summary = ...
}}
For more advanced things, you can try out Semantic MediaWiki with Semantic Forms
Related
Developing email templates for a react application that basically populate basic information from app such as customer name and store name, then get sent to customer to log in to complete purchase process. The company has 4 brands so I created four separate email template with the appropriate logos and images. My question is, would it be possible/better to create just one template and use JS to load the correct images and text in? Or is it better to keep the four templates separate and create logic to determine which template to send?
If you know that you will never have to customize the content of each 4 separate brands' emails, you can use one file and dynamically populate the correct branding info. This will require you to write less code, so is a plus for efficiency and cleanliness.
However, that means you can't change the layout for one brand specifically if you need to. Unless you were to create another template for the actual body of the email which differs from brand to brand, which is basically the same as having 4 separate templates initially.
I would keep them separate to allow customization if you need it.
I was thinking about creating different templates for products (not with different features but with different html organization and css) because the standard "pic on the left and data on the right" is not enough for a well-made user-centered ecommerce.
I tried the custom post types but they are blog post and can't access the product data.
in my custom product.conf i added my custom post data
"acceptTypes" : ["store_item", "custom-product-item"]
but obv. it won't work.
maybe if I could access the store_item could be easier to do this, but i can't find on the repo.
anyone has some suggestion?
Unfortunately, although it used to be possible to create custom post type products, that stopped being possible within the last year or so.
If you want to create your own template for products, you need to override the products.list and/or products.item files with your own. By placing them within your /collections folder, it will override the system default ones.
That means you have to write it entirely from scratch. Here are a couple resources that may help (despite being outdated):
http://www.bcarroll.us/developer-platform-tutorials/2014/10/20/products-pages
https://answers.squarespace.com/questions/57343/productsitem-for-adirondack-template.html
Having overridden products.item, if you want to have different templates for different products, you can do something like:
{.equal? item.urlId "myurlid1"}
{#|apply products1.block}
{.or equal? item.urlId "myurlid2"}
{#|apply products2.block}
{.or}
etc.
I'm building a mediawiki infobox. I'm using the standard table based infobox as opposed to importing the various templates and CSS functionality, and extensions that Wikipedia is now using.
One of the fields in the infobox is a link to various wiki categories. I'd like to keep the linking code in the template, so the source article can just list the category names as perameter values for the infobox.
For example, my template currently contains
<tr>
<th>Some Categories</th>
<td>[[:Category:{{{category_name}}}|{{{category_name}}}]]</td>
</tr>
This works fine if I enter the category name on the source article in my infobox declarations as:
| category_name = Cat-1
In this case, the article displays an infobox, with a link to the Cat-1 category.
However I can't find how to include multiple category entries in the source article, and allow them to link to each one separately. The articles which use this infobox can have from one to eight of these categories to declare.
Do I need to import all of the wikipedia style CSS infobox templates in order to achieve this, or can it be done with a simple table-based infobox?
You will need to add as many template parameters as the maximum number of category names you want to pass to the template and to test for their being defined
So your template code might be something like
<td>[[:Category:{{{cat1}}}|{{{cat1}}}]]<!--
-->{{#if: {{{cat2|}}} |, [[:Category:{{{cat2}}}|{{{cat2}}}]] |}}<!--
-->{{#if: {{{cat3|}}} |, [[:Category:{{{cat3}}}|{{{cat3}}}]] |}}</td>
Etc. This was a common strategy before the Scribunto/Lua templates, which can just loop through data.
Is it possible to have a fixed structure for the HTML using CKEditor. For example, HTML5 placeholders are shown in editor as user hints so user know where to enter what content. Further, it should be possible that user shouldn't be able to change the structure.
An example structure may look like this and placeholder text is shown till user enters the text.
Title Only
....
...
...
As mentioned above, user shouldn't be able to change the structure/order of the sections.
This is a perfect use case for a CKEditor widget.
In short, widgets are special rich content units in that they are groups of elements which are treated as a single entity inside the editor. Once developed, their structure (but not necessarily their content) is immutable and enforced by the CKEditor instance they are used in. These entities can thus be selected and deleted or moved freely as a whole around the editing area, keeping their predefined structure intact. At the same time all the individual parts of the widget (its "building blocks") can be edited or configured separately, again, without affecting the whole widget entity and its structure in the process. Read more here: http://docs.ckeditor.com/#!/guide/dev_widgets
In your case, you could have a look at the sample Simple Box widget which is demoed here and actually created step-by-step in this tutorial. It creates a simple template widget with an immutable structure and pre-defined fields for the users to fill in. What's more, thanks to ACF (CKEditor content filtering mechanism) you are even able to define the elements (and their attributes, styles, classes) that are allowed in each of the widget parts.
Widgets are a really powerful tool, you can see some other implementations of the widget API in the widget demo.
Not sure if I am missing something very blatant or (much more doubtful) I am asking something that hasn't been asked very much (or in a very easily found place on google)...
I am outlining the process to put together a site with a bunch of information (in the form of posts or pages, shouldn't matter) organized into categories.
The categories are as such:
Category: Policies
Post/Pages under this category: Work Policy, Time off policy, desk policies, etc.
Category: Forms
Post/Pages under this category: Benefits Form, Medical Form, Purchase Order Form, etc.
Benefits
Post/Pages under this category: Medical, Dental, Optical, etc.
Is there an easy way to have WP create drop down menus as such:
Policies
-->Work Policy
-->Time off policy
-->Desk policies
Forms
-->Benefits Form
-->Medical Form
-->Purchase Order Form
etc.
Automatically without manually adding each? (also if any posts were added in the future they would automatically appear so long as they were categorized properly).
I am using a the simplex theme , which I have customized myself (http://wordpress.org/extend/themes/simplex)
If I need an additional plugin , etc. that should not be a problem.
Thanks a lot!
-M
Does that theme - or did you modify it - to use the WP3 menu system wp_nav_menu? http://codex.wordpress.org/Function_Reference/wp_nav_menu
The WP3 menu can be used to easily add category menu links: http://codex.wordpress.org/WordPress_Menu_User_Guide