joomla 2.5.6: how to remove date from url - joomla2.5

I created articles with alias overview-of-trips but when I try to view the article url become index.php/destinations/2012-08-08-05-05-05/thailand/overview-of-trips it should be
some thing like index.php/destinations/thailand/overview-of-trips
I queried in xma7k_content db table to find this date/time, but I don't know from where it attaches this date/time.
Menu Item Type is : Single Article

You should check your category (destinations) alias it must be date so it is appearing like this.

Related

Treelist datasource query - Field must contain 'X'

So I am pretty new to Sitecore, and I seem to have gotten myself into an issue that I cant solve or google ;)
So I have an item, this Item has a treelist, and that treelist has a datasource "Products". Now this works fine, the issue is that I only want the items (products) displayed in my treelist, where the Product Category is "Shoes".
The Product template has a Multilist named "Categories", so i would like a query, that evaluated if one of the Categories is "Shoes" if so, include the Product in my Treelist, if not exclude it.
Can it be done with a query or do I need to do some actual code to get that result?
Any help would be much appriciated.
You can use Sitecore's fast query in source field of template field as below:
Using contains:
fast:/sitecore/content/Home/Products//*[contains(#Categories = 'IdOfShoesItem')]
Using like:
fast:/sitecore/content/Home/Products//*[#Categories = '%IdOfShoesItem%']
On older sitecore version fast query does not work, in those cases replace "fast" with "query" like below:
query:/sitecore/content/Home/Products//*[#Categories = '%IdOfShoesItem%']

Using Sitecore query in Field 'source' not working properly

I am using a sitecore query in a source for a field Subsidiary:
/sitecore/content/Home/Organization/descendant::*[##templateid='{8BE84E6C-CAA3-4D03-9FD2-B95B89A7DDE0}']
Field Type is : Droplist
So in When I see the item which is based on the above template and I click on the field, I don't see any thing.
You can also see the images for more detail.
This is template where I am giving the above query in the source.
This is what I see on the item in the field Subsidiary
You need to prefix your xpath with query:
query:/sitecore/content/Home/Organization/descendant::*[##templateid='{8BE84E6C-CAA3-4D03-9FD2-B95B89A7DDE0}']
You can also use the shorthand for descendant:::
query:/sitecore/content/Home/Organization//*[##templateid='{8BE84E6C-CAA3-4D03-9FD2-B95B89A7DDE0}']

Sharepoint2013 list item filter

My requirement is I have to submit records into a list/lib with attachments and that record can be tag to category field they can be multiple for a single item.
i.e. An item A can be tag to tag to category X or can be cat X,Y(multiple category can be)
My requirement it user can also filter these record in list/lib on the basis of category tagged.
i.e. if an item A is tagged with cat X,Y it should be show in both cat when we filter.
What approach i should i use in Sharepoint 2013?
you can use the taxonomy to achieve this behaviour. Generate Term sets and terms in it and use them to tag your List Item.
You didnt provide the details about how you are searching the data? by your code or the OOTB sharepoint search ?
Thanks

Opencart: i need to search any product inside subcategories

I'm trying to create a menu with buttons that can filter products by main categories
This query url finds products inside a category:
/index.php?route=product/category&path=61
i can find only a part of products with a subcategory search.
/index.php?route=product/category&path=61_72_73
I need to NOT LINK products with their category parents, so is there a way to search with a subcategory filter?
I tried something like this:
/index.php?route=product/category&path=61&sub_category=true
But this doesn't work, it works only with textual searches like this one:
/index.php?route=product/search&search=chair&category_id=61&sub_category=true
ModelUse 'Advanced Product search for OpenCart'. You can search sub categories and any filters you add (including custom ones) with it.
http://www.opencart.com/index.php?route=extension/extension/info&token=460e88e8227b9d7e80466e026dbe1f64&extension_id=13605
I use it for a car dealer website with filters like year, make, model (and sub categories of those) etc and it works great for me.
Here's a demo link:
extension demo link
Try
index.php?route=product/search&search=%25&category_id=25&sub_category=true
25 is category id (which is not mandatory)
and search=searchterm is for a sting search in all sub categories
search=%25 means all products
search field name has changed at some of past version try this for 1.5.4.1
index.php?route=product/search&filter_name=%25&filter_category_id=20&filter_sub_category=true
and see here
http://demo.opencart.com/index.php?route=product/search&filter_name=a&filter_category_id=20&filter_sub_category=true

Sitecore - Validate a drop list value change event

I have a sitecore item, "category", which has a drop link which populate "product type" template list.
Each category can have a "product type".
(Products being created under a category node will be using the template selected in the drop down. e.g. Shoes category will have a Shoes template, Slippers category will also have a shoes template, Bags category will have a bags template).
Problem:
These categories should be able to mark related categories. Therefore I need to show a treelist kind of a control which only allows options to select categories with same "product type".
Under "Shoes" category, I need to have "Slippers".
How can I do this?
After selecting "Slippers" as the related item to "Shoes", if the user tries to change the "product type" drop link value in "slippers", how can I warn the user that this product type has already linked to another category?
(Validation on saving the category item.)
Hope this is a common issue with Related items in Sitecore, yet I could not find a solution for this.
Your first problem, "marking related categories" is not clear to me what you want to achieve with it.
But if I understand you correctly, you want to select a product-type-template in the Category-item to let the editor create products of the chosen producttype below the Category-item.
You can resolve this by using the item:saved event on the Category-item:
- first check if you are saving an item of type Category but checking the template.
- If it is a Category-Item, read the value of the product-type droplink and on the fly add this template to the insert-option of the Category item.
Your second problem with the check on related items can merely handled the same way by using the item:saving event. Not the item:saved event because you want to do the check before the item is saved so you can cancel the saving and display a messagebox through the Sitecore.Web.UI.Sheer.SheerResponse.Alert() method.
In the item:saving event you need to check if the current item has 1 or more referrers (items that link to this item) through the LinkDatabase method Globals.LinkDatabase.GetReferrers().
Using validation on this instead of the item:saving event is not usefull because the validation event only throws a warning and saves the item anyway.
Another good link with example code is this blog of John West.