refinerycms 2.0.3, how adding a field only to the home page - refinerycms

In Refinery 2.0.3, i would like add a field (text) only to the home page.
I find it Custom fields in Refinery CMS, but if i understand, the field is applied on all pages.
Someone have an idea ?
Thank you

in your /config/initializers/refinery/pages.rb
uncomment # config.new_page_parts = false
into config.new_page_parts = true.
Restart your server, and then you can see in the back-end page editor you are now able to add new content field as many as you want in addition to the existing body/sidebody tab field. So in your home.html.erb you can call in the newly created field with <%= #page.content_for(:newpart) %>
Hope this helps.

Related

TYPO3 v9.5 no URL Segment [slug] field visible in Page Edit

After upgrading from Typo3v9 to v9.5, I still do not see the URL Segment [slug] field .
The field has been added to the "pages" table under the column/field "slug" and also been populated, but the field is not visible in the BE and the links not updated.
Is there documentation/configuration I am missing?
You need to add a Site Configuration for your page tree in the new Sites module of the TYPO3 backend.
Only then the new slug field becomes visible in backend forms and the URL segments get used in the frontend instead of the old default index.php?id=1 links.

Why doesn't display own flieds in FE by sr_feuser_register?

I add some fields into fe_users with an own extension. In Typo3 8.7. When I logged in the Backend from Typo3 and in another Tab I open the Webpage I see my added fields in the registration form from sr_feuser_register, but when I logoff Typo3 backend, the labels are empty in the registration form. The value fields are displayed, but with no content, and new content don't saved.
What do I wrong?
The Only thing I found, is:
$GLOBALS['TCA']['fe_users']['feInterface']['fe_admin_fieldList'] .= 'field1,field2...';
But this, don't help.
Thanks for any help
Update:
I found a Bug: https://forge.typo3.org/issues/84587
Putting the code from ext_tables.php to YourExtension/Configuration/TCA/Overrides/fe_users.php help. Problem is solved.

How to get element id in google forms

I want to get the id of an element in google forms. I found on the internet that it can be done by right clicking on the element and opening inspect element. It is working for older forms but, for new forms, it doesn't show any id attribute. I am posting both images of inspect element.
Old forms:
New forms:
In new form google have replace id with name attribute.So do one thing, write something in textbox then rightclick on textbox and open inspect element, Here you will find item tag with name attribute which is the key you want
For eg,
<input name="entry.123456" >
Maybe I can help you in finding the id's of the element.
After submitting the form you can look for headers{Form Data} in the network section of developer tools.
You will find something like this..
entry.102708304: "Your response"
102708304 is the id..
Hope my answer was useful. Thank You.
Try pressing Ctrl+U when on the Google Website. In Firefox this will show up the complete HTML Code where you can search better. There has to be set an Id, because otherwise the text in the element couldn't be accessed
hi this has changed a bit,
you need to get a pre filled link via 3 dot menu then prefilled link , copy it into an editor and confirm these entries.
I could not find it visible anywhere in the source code and there are a ton of JS names that seem random and 0 name inputs on my form

How to hide "User Information" options from "My Account" in Liferay 6.1?

I am trying to hide some options in "User Information" from My Account by using hook. I just want to hide it using CSS (style="display:none"). User Information is present in the right side of My Account Page.
I want to know, in which page I should make changes? While creating hook which page I should select for hiding those links like "Organizations, Sites, etc." Please help...
You have to choose the tab you want by writing them in the portal-ext.properties as follow :
#
# Input a list of sections that will be included as part of the user form
# when updating a user in the My Account portlet.
users.form.my.account.main=details,password,organizations,sites,user-groups,roles,personal-site,categorization
users.form.my.account.identification=addresses,phone-numbers,additional-email-addresses,websites,instant-messenger,social-network,sms,open-id
users.form.my.account.miscellaneous=announcements,display-settings,comments,custom-fields
Each field will be linked to its jsp. For exemple, "details" will display details.jsp.
Since your problem is finding the jsp file, you should do these :
download the Liferay source, and add the portal-trunk as a Liferay Project in Eclipse
Navigate through the portal to your desired file (manage my account), and get the url from your browser
Search for the "struts_action" attribute in the usl. For this case, it's "/my_sites/view"
This is very helpful as the first parameter indicates the portlet that controls the jsp page.
The second parameter usually is the jsp you are searching for
Find that file in the portal trunk and search for the html component you want to edit. it might be in the page itself, or it could be on an included one, or a sibling one (provided as a tab)
For your case, it's "/portal-trunk/portal-web/docroot/html/portlet/users_admin/edit_user.jsp"
It is not possible to remove those options using CSS. We can do the following simple java code for removing those tabs... The page which we need to edit is "/portal-trunk/portal-web/docroot/html/portlet/users_admin/edit_user.jsp".
List<String> identificationList = new ArrayList<String>();
for(String identificationItem : identificationSections){
identificationList.add(identificationItem);
System.out.println(identificationItem);
}
identificationList.remove("websites");
identificationList.remove("instant-messenger");
identificationList.remove("social-network");
identificationList.remove("sms");
identificationList.remove("open-id");
identificationSections = new String[identificationList.size()];
for(int i = 0; i < identificationList.size(); i++){
identificationSections[i] =identificationList.get(i);
}
Its easy to hide those links by using the simple java code written above.

How show comments approved by custom form Orchard CMS

Here my question : How can I show, on a page, all the comments I received from a custom form throught Orchard CMS ?
If your not sure to understand my question, here an example of what I want :
Create a Guestbook with a new Content Type named "Gestbook". Add two fields (the name and the comment). Once add it on Forms tab, add comments into the new guestbook page into your website. After that, how can I show them after approved it throught dashboard ?
Thank you very much,
David
Click on "submissions" on the right of the form in the Forms section of the admin to see what got added by users. You can also trigger additional actions from the Rules module.