How do I create a reusable mailto link in ModX? - modx

I want to create a link to an email address like somebody.
I tried to use a weblink resource (which gets an id of 20) with mailto:person1#provider.nl as link value and render this in my content with the tag [[~20?~]]. (and different variations of it)
But ModX renders it as somebody This is not what I want.
So how do I do this properly, so that I can reuse this resource in several places in the website?
This link needs to be editable for a 'Content editor' with reduced rights, so I don't think a chunk is the best way to go.

Because to do this you need to create weblink:
and this is works as expected in Wayfinder/PdoMenu:
UPDATE:
[[~20]] - will output alias field. You need to output content field. To do this use pdoField snippet (part of pdoTools):
[[pdoField?&id=`20`&field=`content`]]

Related

Views / edits current page xWiki

Is there a way to publish the amount of views/edits of a page in/on the page itself in xWiki?
I've used parts of this article to create an accessible form to see usages of different spaces. But I would also like to publish the views/edits on the pages itself.
Thanks in advance!
Richard
I would suggest you use an UIExtension point (see https://extensions.xwiki.org/xwiki/bin/view/Extension/UIExtension%20Module and the tutorial https://www.xwiki.org/xwiki/bin/view/Documentation/DevGuide/Tutorials/UIXTutorial/) from the list of available ones (https://www.xwiki.org/xwiki/bin/view/Documentation/DevGuide/ExtensionPoint/) to add the extra information to be displayed on each page.
I guess the most suitable UIXP would be the Content Footer one (https://www.xwiki.org/xwiki/bin/view/Documentation/DevGuide/ExtensionPoint/ContentFooterUIX/).
Inside the UIX you add, you can do a simple query to fetch the view/edit values from the statistics module (either with the API, if it exists) or with a HQL query, like in the example you've mentioned.

Drupal how to add a search filter to admin content page

I've never used Drupal before (development or managing content). I was asked to extend the admin content page to have a filter and simply don't know enough to get moving quickly.
Can anyone tell me if adding a search by text filter in the admin content area requires code or is there a CMS feature like adding a node for this task.
If code is required, is there something like a hook for this area? Not sure where to start. I will be investigating on my own but pointers to get me oriented to Drupal would help.
By default Drupal provides search mechanism ready to use. But there are also additional module which can improve search experience. You don't need any coding to use that search. You already have search form block ready to use.
Go to Structure -> Blocks and find block called "Search form". Now all you have to do is to put that block in some region and it will appear on front-end. Of course if it's not already styled by your theme it may be needed to put some extra CSS to make it look nice. There are also some template files which you can override and put some your HTML if you need.
There's also template file for search results page (which of course will work out of box also).
You may also need to create new block region if you want to place your form at some specific place, not covered by any existing region defined by your theme (easy thing to do!).
See https://drupal.stackexchange.com/q/30633/101329, the "Admin Views" module lets you configure the search form as you like.

listing same content on diffrent pages in MODX

I am trying to add a small "3 box news segment". I wanted it, to be visible on multiple pages. Normally I would just use chunks but the thing is that I want to be able to modify "3 box segment" content and preferably with a ritch text. Any Ideas how to accomplish that?
You can use getResources to grab the content from 3 hidden resources this way you still keep your chunks for the segment layouts and your actual content is in the resources [which you can update with the rich text editor].
Instead of getResources you could also use getResourceField to get the value of a field or template variable on for example the homepage. This allows one place to manage it, and you can just reference it with getResourceField when you want it to show elsewhere.

Dividing long content to subpages

I need to divide long content to sub-pages.
Rule for dividing: Heading1 (H1)
Cms-system: MODX Evolution
As far as i know, there is nothing in modx to use for this kind of problem.
I probably got to do this manually anyway, but i still would like to know if there is a way to do this in MODX Evo / Revo.
Edit:
I need to do this in MODX; sub-pages got to be actual subpages, and original page becomes to container.
Navigation will be done with wayfinder.
Edit2:
All done.. manually. Question still open, though.
This is not possible out of the box and I don't know of any extra that archieves what you want. You would have to write a plugin that acts everytime you save a resource and split up the content, create/delete sibling resources as needed etc. Sounds like a lot of work for what you want to archieve to me.
I suppose you have a look at the MIGX extra. It provides you with a TV with the possibility to store an indefinite amount of distinct TV content sets. Have a look at the documentation and Mark Hamstra's tutorial (with screenshots) to see how it is done. You should define one MIGX entry to consist of a text field for the <h1> and a rich text field for the content of the "subpage".
Afterwards, you can use form customization to hide the original content field and display your MIGX Tv instead.
I think, this is a much easier way to archieve, what you want, and can't think of any way, where you would benefit from actual subpages.
Edit: Sorry, I just recognized that you were asking about Evolution, not Revolution. My solution would work in Revo, but I don't think there's something like MIGX for Evo. Sorry, my mistake.
not 'out of the box' you will have to run your content through a snippet to parse it into separate divs or something that you can run some javascript on to possibly 'tab' the content.
If you need to show the 'subpages' in your navigation, you will probably have to use the gatResources extra to parse your content ~ which will be very expensive on resource usage.
You can (depending on how you're using the tree) just create actual sub resources under the parent resource, using Ditto or Wayfinder to build navigation for it.
If you can't use the tree like that (though from your description I think you can), you could also set up a number of template variables ("content1", "content2", "content3" etc) and show that with a simple snippet or so.

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.

Resources