Sitecore Set base templates excluding a Field - content-management-system

Is there a way in sitecore where , when you are setting a base template you can exclude a certain field ?
For eg: i have a base template with 4 fields
Name,Id, Salary, Phone number , Facebook Id, Twitter Id, LinkedID
If i have 3 Item Templates FB, Twitter, Lin which has the same Base template -
I would like not to inherit only certain fields - ie, for FB Item I would like to inherit everything except Linkedin and Twitter . And for twitter - everything except FB and Lin.
Please note: this is just an example scenario. This is the best example i could think of. I would like to know if this is feasible with sitecore.
I understand that the ideal option would be to separate out the user info template from social info. But that is just for this scenario.

No. You cannot do this in Sitecore.
Sitecore template inheritance does not allow excluding certain fields from inheriting in child templates.
You may consider creating another "base base template" containing only what's needed in all inheriting templates.

Related

Is there a way to display the Product Title before the Brand Name in Facebook Page Shop?

I exported all the tags required by Facebook from my third-party online store (Lightspeed) and the data stream works as expected in terms of automatic updates, but products on my facebook page shop (Shop tab) are displayed with the brand name first — L'Oratoire Saint-Joseph — followed by the product title.
See it live : https://www.facebook.com/osaintjoseph/
The unfortunate result is that the text under many products is exactly the same. Is there a way to display the Product Title before the Brand Name?
Lightspeed support told me I had to take it up with Facebook. I am awaiting their reply. See my questions in the fb developer forum here : https://developers.facebook.com/settings/developer/community/
There are 3 ways to add products to Facebook Shop:
Manually
Data feed (e.g. CSV import)
Third party plugins (which you’re using).
Manually – the user is only able to enter 4 properties; title, description, image & variant. See facebook.com/business/help/293945421560847. There is no concept of product brand.
Data feed – this allows for additional properties, such as brand name. In the table, see example files and select product (csv, tsv or xml) facebook.com/business/help/120325381656392?id=725943027795860. However it looks like all Facebook does is concatenate string, that's the product title becomes "{brandName} – {productName}". It look like brand name is not used anywhere else. Nor is there an option to change the way it's displayed. If you edit the product, you should be able to see this in the Product Title.
Shop tab (third party plugin) – (May be it's me, but I found their documentation hard to follow) – They send an XML feed to Facebook support.shoptab.net/hc/en-us/articles/200583466-XML-Feed-for-Facebook-Storefront-with-ShopTab. They do not appear to have a concept of brand. Try and examine the data. I would expect the brand name to appear in the product title. Alternatively they allow for CSV, which also doesn't contain brand name support.shoptab.net/hc/en-us/articles/200583906-CCNow-Integration-with-ShopTab-s-Facebook-Store-App
Summary
If possible, examine the data that is sent from Shop tab to Facebook.
Try and find out if you’re able to exclude / alter the string concatenation of brand name from product title in Shop tab. If not raise a support ticket with them.
Alternatively see if you can manually edit the product title in Facebook. It’s not a long-term fix, but helps understand how the system are integrated.

How to tag pages and layout (not assets) in Liferay

I have a Liferay site. I have several pages that needs to be tagged so I can get them in a custom portlet.
I also need to present a page with an alphabetic index of the tagged pages.
I have read documentation and I have seen that Liferay can put a tag or a category only on "assets" (web content, etc.) and not on a page/layout.
Can you suggest me a way to do it?
You are right about tag/category, these can't be applyed to layout (unfortunately).
The best alternative is to use custom attribute and define the extra fields for the page.
See this image
You can read the custom attribute for the page using ExpandoBridge API.
Here an example to read an extra attribute within the theme velocity template.
#set ($customField= $layout.getExpandoBridge().getAttribute("CustomFieldKey"))
Note: Remember to set the permissions on each custom attribute. It's very important!

Do I need to repeat all the categories on all sub-pages?

I am marking up the content on my website with microdata. I am a Local Business and use this hierarchy:
Organization/LocalBusiness/TravelAgency/
Do I need to repeat all the relevant Properties for each category: PLace, Organization, Local Buisness and Travel Agency in each page of my website?
http://schema.org/TravelAgency
I have many sub-pages and it is over-kill to repeat everytime on the page the location, address, telephone, etc. of the business.
For specific sub-pages can I cut out the higher categories?
For example: If I have a page: Special Offer Weekend in New York
Do I add all the Properties or can I just add the ones relevant for TravelAgency and potentially Price?
http://schema.org/PriceSpecification
Thanks for your help
PS: I ask this because I have read that it is not good to have invisible content for the user.
Schema.org doesn’t define any required properties, so everything is optional.
But note that there is no concept of "website" in Microdata. The Microdata always gets parsed per document. So if a Microdata consumer parses your "Special Offer Weekend in New York" page, it will not get the telephone/address/etc. of the business, even if these would be specified on all of your other pages.
If you don’t want to markup all the visible content about your business on every page, you might want to link to a page where this data is marked up (e.g., the front page) by using an appropriate Schema.org property.
Example: On "Special Offer Weekend in New York" (Offer), you could use the seller property to link to your front page (TravelAgency).
It’s not defined in Microdata that those links should be followed for parsing Microdata, but that way parsers can (if they want to) understand that all these pages belong to the same TravelAgency.

How to display drupal custom form if user clicks adwords advertisments?

My client want to published some adwords advertisement on Google. The website only purpose is presenting info about it's company and it's not an e-commerce site. Since adwords final result depend on conversion we decided to add simple form including following fields.
1) Name:
2) Email Address:
3) Occupation:
However, we need to display this form if only a person clicks on the 10% discount adword advertisement via Search or Display network. We think by user submitting this form user may contact us is definite.
My Questions are:
1) Is there a way to display this discount form only if user click the Google add? if so could you pls clarify
2) Is there a module for Drupal 7 to create custom form fields?
3) Otherwise is there a different method to achieve what I explained above?
The Referer HTTP header field might tell you the URL of the page from which the user might have come to your site.
The first might means, there is no quarantee that it is present.
The second might means, if it is present, there is no quarantee that it is accurate.
The Fields module can be used to create custom form fields. It is part of the Drupal 7 core. It can be used to attach fields to bundles. A bundle is a set of entities. EXamples are
The nodes of a node type are a bundle
All users are a bundle
The terms of a vocabulary are a bundle
The Fields module provides an API to define new entity types and groups them into bundles.
1 - You can create a unique Webform and exclude it from search engines in your robots.txt file. This will allow it to be accessed directly via the URL, but it won't be picked up by any search engine, and therefor can't be found by anonymous users. You'll have to add it in the robots file as such:
User-agent: *Disallow: /your-page-path/
You may also have to exclude it from your site's search (if you have it).
2 - If you haven't already tried the Webform module, it's a great module for creating custom forms and gathering submissions right within the Drupal site.

Wizard based feature install in sharepoint 2007?

I have a feature that gets installed using a WSP package, when the feature is activated, I would like the following to happen:
The feature will contain a list definition.
When the feature gets activated by an end user (the user physically clicks the feature activation button in site features admin) - I would like a modal dialog to appear then ask the user to provide some additional details.
3.1 The additional details will be supplying a certain number of names. For example Mary, John, Peter. Form logistics I can handle.
Once the form is complete that information needs to somehow get back to the feature reciever, so that I can then take the base list definition, and use it as a template to create list instances for all the names supplied - so if user had supplied Mary and Peter, then 2 list instances will be created when this feature is activated.
Is any of this possible with MOSS 2007? Thank you
There's no way to "hijack" the feature activation process in sharepoint. The (crude) solution would be to create a feature that deploys an application page (aka layouts page) and the list template/definition. On the page there should be a bunch of textboxes and a submit button.
The feature should have a receiver attached to it that after activation redirects the user to your page using HttpContext.Current. After entering all relevant data in the page ( Mary, John, Peter, etc.) just create the lists based on the list template deployed earlier from code using something like:
SPListTemplate listTemplate = web.ListTemplates["YOURLISTTEMPLATENAME"];
web.Lists.Add(listName, description, listTemplate);
There is 1 caveat though, IMHO a dealbreaker even. this won't work when the feature is activated using stsadm, seeing as there is no HttpContext!!!