MODX - Template variable that hides post author when checked - modx

So I am using the add-on articles to create a press release section on my site. I need to create a template variable that is a check box and if checked it will NOT show the post author:
[[*publishedby:userinfo=`username`]]
What is the best way for me to do this.

If your checkbox tv input option value like "Hide==1" then use output filter like this:
[[*your_tv:ne=`1`:then=`[[*publishedby:userinfo=`username`]]`]]

Related

Modify form field create annotation tool like Textbox, Checkbox, radiobutton, list for proper icons

I am trying to create form field in webviewer(JavaScript) but every control(Textbox,List,Dropdown,Signature) look like same(rectangle) while we are creating forms, once we click "apply fields" it looks good but I want same UI while creating form.
Please see attached images
We've added the feature to our backlog to be worked on in the future. We don't have a timeline for when it will be available but if it does get worked on we'll let you know when it's available in an experimental build to test out and the estimated official release date.
If this is a critical new feature for you and you need a fixed timeline for this to be completed by, then we are sometimes able to do so as a custom engineering project. If you are interested in that, please fill in this form.
https://www.pdftron.com/form/professional-services/
Wanbo

Grav - Parse URL

I want to define a new template called "product".
This template calls an external service and retrieves the information about that specific product. That is easily done with a custom plugin that access the product information. Information on how to do that has been found here.
However, I would like that the URL of the page would be something like:
/product/<id>/<seo-friendly-description>
So I can retrieve in the Twig template both <id> and <seo-friendly-description> which will be used later to retrieve the specific product information.
I have tried to find something that could help in the documentation, without success. Could someone either point me to the right doc section or highlight the basic steps that shall be achieved so I can start solving this issue?
Just in case it helps, I am trying to find something similar to how bottle or other web frameworks work:
#route('/hello/<name>')
def greet(name):
return 'Hello ' + name
I've been building a family recipebook into my own website and I've been working through a similar problem. I haven't quite worked out all the kinks, but my solution is mostly working if you want to checkout my github repo.
In short, you need the plugin to watch what the active route is. If the route matches, you then create the page and populate it using your plugin data.
I haven't quite figured out how to get the active page to highlight in the navigation menu for generated pages, but you might still find this solution helpful.

Conditional fields in Liferay Web Content editor

We have a requirement for creating a banner for which we plan to use Web Content Display.
As part of the implementation I have created a structure with the required fields like link-type (drop-down), etc and using corresponding template.
I wish to make a conditional check based on the type of selection in the link-type and show link-to-page or text-box.
I observed that there is no option to have a conditional check in the article editor rendering.
Thus I wish to check whether there is any hack or trick that we can do to achieve the above conditional thing?
Also, can we inject custom Javascript to achieve this as part of the structure?
I finally have to stick to the default options in the liferay structure. I plan to use separator provided by LR to categories the elements to avoid end user (admin) confusion.
P.S. I was not able to locate any cool doc that would help in implementing the suggestion made by #Tobias (sorry, but I guess the wiki link above assumes you to be an expert of LR, and even the sample links in there does not work).

Change template html in sharepoint discussion reply box

I have a wss 3.0 install which needs an "anonymous" discussion board. I can modify the view so no usernames are displayed, however when I click on "reply", the message I'm replying to shows up in the rich text box with the username of the previous poster.
Is there a way to remove that username? or Remove the previous posted text altogether? I've found the schema.xml file with lots of relevant info under the ..12\TEMPLATE\FEATURES\DiscussionsList\Discuss folder, but not sure if this is the easiest way to adjust this setting.
Any comments appreciated.
Best practice says that you should always create a custom list definition instead of trying to modify the OOB assets.
The easiest way to do this is take a copy of the 12\TEMPLATE\FEATURES\DiscussionsList\Discuss folder, modify the feature Ids and names so that its unique. Then your free to change the schema render template (i.e view schema) and modify the edit and display forms.
If you need to modfify the actual entry form you may consider a custom control template : http://msdn.microsoft.com/en-us/library/aa543922.aspx
Custom list definition : http://msdn.microsoft.com/en-us/library/ms466023.aspx
Agrothe,
I have a similar requirement (hide or mask the author inside the reply thread.). What exactly inside of schema.xml do you think will allow you to do accomplish that?
Not sure if the list forms are exposed to xslt. If so, then perhaps this is another approach.
FWIW, the other solutions I have investigated:
(1) A custom event handler. Unfortunately, I can't pinpoint which event fires when someone click reply.
(2) Anonymous blog comments (http://blogs.msdn.com/sharepoint/archive/2007/08/06/anonymous-comment-feature-for-sharepoint-blog-now-available-on-codeplex.aspx).
(3) the other thing I am considering, is to introduce a global anonymous active directory login, which users can use to post anonymously. Not ideal, but for the amount of time I have spent researching a solution, might be my last hope.

Change view of SharePoint Calendar for multi-day events

I have SharePoint calendar control with multi day events:
Calendar http://1.bp.blogspot.com/_8yYCvwdJans/RuECTJE5OmI/AAAAAAAAACc/iEqKLxyaZ9I/s1600-h/5.PNG
http://1.bp.blogspot.com/_8yYCvwdJans/RuECTJE5OmI/AAAAAAAAACc/iEqKLxyaZ9I/s1600-h/5.PNG
Here, the calendar shows "A multi day event". Actually it's an event that starts on the 4th and ends on the 7th.
Requirement: I need to hide the "A multi day event" bar and have it show only on the 4th with the end date.
for hiding something like that you might want to look at a more lightweight solution like jquery or CSS. unfortunately I can't see the rendered html code at the moment but if ou are familiar jquery or css id imagine it wouldnt be that difficult.
As far as I know, it is not possible without customizing the sharepoint template (list definition) for the Calendar list.
Please refer to the out of the box list definition feature:
(12\TEMPLATE\FEATURES\EventLists)
Do not modify the files in this directory... if you wish to create your own feature, then simply copy/paste the contents to a new directory in FEATURES (and change the feature GUID), or add the contents to your Visual Studio project (depends on how you want to deploy).
You will need to modify the schema.xml file in the \Events directory. You can refer to this link to help you with that:
http://msdn.microsoft.com/en-us/library/ms459356.aspx

Resources