I wanted to change the url of search result,
I found that this is an aikau page ,
The faceted-search page returns multiple results ,
If we click on search result item which is document then it's redirects us to document-details page ,
as shown in image the url /share/page/site/swsdp/document-details?nodeRef=workspace://SpacesStore/5fa74ad3-9b5b-461b-9df5-de407f1f4fe7 i wanted to add one parameter here
like this /share/page/site/swsdp/document-details?nodeRef=workspace://SpacesStore/5fa74ad3-9b5b-461b-9df5-de407f1f4fe7&searchTerm=web is there any way to add this parameter,
please help.
searchTerm=web
I have overrided aikau widget FCTSRCH_SEARCH_RESULT with my custom widget files by
var searchResultWidget = widgetUtils.findObject(model.jsonModel.widgets, "id", "FCTSRCH_SEARCH_RESULT");
if(searchResultWidget) {
searchResultWidget.name = "custom/alfresco/search/AlfSearchResult";
}
So my widget FCTSRCH_SEARCH_RESULT will be like this
{
id: "FCTSRCH_SEARCH_RESULT",
name: "custom/alfresco/search/AlfSearchResult",
config: {
enableContextMenu: false
}
}
and able to call my custom widget js file and changed the url.
Related
When configuring the views of a calendar, view specific options can be specified. But the documentation about custom views says nothing on how to retrieve these options.
Is there any way to get these options here and so to make the custom view to behave function of them ?
Is there even a way to access the view object from a custom view callback ? (maybe the options are available on it)
One solution I've used, but I think that should be part of the core behavior, is to use the undocumented viewPropsTransformers option when creating a custom view through a call to createPlugin :
class MorePropsToView {
transform(viewProps, calendarProps) {
return {
...viewProps,
options: calendarProps.viewSpec.optionOverrides,
calendar: calendarProps.calendarApi,
}
}
}
export const myPlugin = createPlugin({
views: {
custom: CustomView,
},
viewPropsTransformers: MorePropsToView,
})
So the two extra props are available in the custom view :
const CustomView = function CustomView({
eventStore,
dateProfile,
options,
calendar,
}) {
console.log(options, calendar)
}
I have homepage which is created by using multiple small template pages in wordpress. I have set menus on it . now i want to go on particular section/ template using menu. like if i press contact menu button then it should go smoothly downwards of homepage where the contact template has been called. I am using "Page scroll to id" plugin of wordpress but its not working. I have also seen that this plugin work when the page is created by dashoard page. Please help me , how can i navigate to my template page/section using this plugin. If any other plugin is there , please tell me about it . i will try to use that too.
Thanks
To create smooth scroll on link click follow the below steps :
Step 1: Add section ids in menu href including #section1 from admin section Appearance >> Menu .
Step 2: Create section or div with id name section1.
<div id="section1"></div>
Step 3: Paste the below code under your custom js file.
$(document).ready(function(){
// Add smooth scrolling to all links
$("a").on('click', function(event) {
// Make sure this.hash has a value before overriding default behavior
if (this.hash !== "") {
// Prevent default anchor click behavior
event.preventDefault();
// Store hash
var hash = this.hash;
// Using jQuery's animate() method to add smooth page scroll
// The optional number (800) specifies the number of milliseconds it takes to scroll to the specified area
$('html, body').animate({
scrollTop: $(hash).offset().top
}, 800, function(){
// Add hash (#) to URL when done scrolling (default click behavior)
window.location.hash = hash;
});
} // End if
});
});
I hope it will helps you.
i have a problem with ionic2 + angular ts + wordpress to create bookmark page.
i dont understand, how to put current url of page, and then i want to assign url to localstorage so i can create bookmark of page.
anyone can help ?
i have searching about this problem about 3 days, but i get nothing.
to get url i try with this code and test on console.
#Component({
selector: 'page-favorites',
templateUrl: 'favorites.html',
})
export class FavoritesPage {
url:string = this.navParams.get('url');
constructor(
public navCtrl: NavController,
public navParams: NavParams,
){
console.log(this.url);
}
the console say undefined
it's hard to give suggestions based on the information you give. What URL are you trying to save to your favourites?
navParams.get() gets the parameters you passed when opening that page.
As an example, let's say you have a "Home" page and a "Favourites" page. When your app loads you see the home page. You can then add a link to the favourites page and pass it a parameter like that:
let data = 'test';
this.navCtrl.push(FavouritesPage, {
data: data
});
You can then get the value of the data parameter on the FavouritesPage like that:
constructor(...) {
this.navParams.get('data'); // This will be 'test'
}
You said that you work with Wordpress. So somewhere you will have a URL like "https://example.com/my/path/" or a unique ID. You need to pass that URL to the favourites page as described above. Or if you are trying to favourite a page in your app, I would instead pass a unique name and then use that name to open the according page (using an if/else).
Just use "window.location".
the navParams is to pass parameters between the views.
In a asp.net C# webapp I'm using the CKEditor 3.6.2 and I'm facing the following problem:
In my stylesheet I have a CSS class to use in tables and I'm trying to bring this class already filled in the "Table properties", "Advanced" tab and the "Stylesheet Classes" field.
I want to bring this field filled with the string "blue_table", which is the name of my CSS class. I'm working with the source of the "table" plugin. I have figured out how to change the value of fields like width and height, but the one I want is the "Stylesheet Classes" field.
Do any of you know to to set a default value for this field?
You don't have to edit the ckeditor.js file to customise the editor. You can add the following either to config.js and use it site wide or on any page where you're using CKEditor (inside a script tag as below, after the editor fields you're using).
<script type="text/javascript">
CKEDITOR.on( 'dialogDefinition', function( ev ) {
// Take the dialog name and its definition from the event data.
var dialogName = ev.data.name;
var dialogDefinition = ev.data.definition;
// Check if the definition is from the dialog we're
// interested on (the Table dialog).
if ( dialogName == 'table' ) {
// Set the tab
var advTab = dialogDefinition.getContents( 'advanced');
// Grab the field
var stylesField = advTab.get('advCSSClasses');
// Set the default value
stylesField['default'] = 'blue_table';
}
});
</script>
This is modified from the CKEditor documentation. The hardest part is working out the IDs and names for all the fields used in the dialogs.
Finally I found the answer. This property is in the dialogadvtab, in the property "advCSSClasses". The thing is that this plugin is inside the core js, I mean the ckeditor.js.
I had to do this :
children :
[
{
id : 'advCSSClasses',
att : 'class',
type : 'text',
label : lang.cssClasses,
'default' : 'blue_table',
setup : setupAdvParams,
commit : commitAdvParams
}
]
The "problem" now is that I had to do it in the ckeditor.js, which is not a good practice. The problem is solved, but not int the best way.
I have a grid panel containing store displayed on many pages (using PagingToolbar).
On the tbar, I put the button to have a query for all data in store according record.get("criterion"). I've tried using queryBy, but it's returning none. So, I use filterBy in button handler, as coded below:
new Ext.Button(
{
text: 'Query',
icon: 'img/icon_search.gif',
scope: this,
handler:function(){
my_store.filterBy(
function(record, id) {
return record.get('field_name') == 'The Content of Field Name';
});
}
}
),
Unfortunately, the query (filter) above only search on current page of grid. How to get all filtered (queried) data from other pages that doesn't displayed?
Look at using remoteFilter on your store, or using the GridFilter plugin.
store.filterBy(function(record)
{
return lines.indexOf(record.get("line_code")code)>0?true:false;
},store.getAllRange()