Django CMS isnot in admin page, why? - content-management-system

i followed all steps in this docs: http://docs.django-cms.org/en/2.3/getting_started/tutorial.html#configuration-and-setup
and everything is working fine, but in admin page i dont see cms block where i can add pages. what could i be missing ?

I don't know if you have solved this, but I had the same problem: I mistyped plugin_pool.register_plugin(MyPlugin) and that made "CMS>Pages" section disappear in the admin. Maybe you have something wrong in your cms_plugins.py file too. Something similar happened to me when I tried to use {% extend some_variable %} instead of {% extend "base.html" %} in my template. I hope it helps

Related

TYPO3 felogin with Bootstrap Alerts

i use the TYPO3 extension felogin. I can configure different texts here. But I would like to show a bootstrap alert if someone entered wrong user data. How can I do something like this? On the page https://t3bootstrap.de//en/extensions/felogin/ there is an example, but I do not know how this is implemented. Does somebody has any idea?
Best regards
MS-Tech
I'd first open the Template Module in the TYPO3 backend and select TypoScript-Object-Browser from the select. Then switch to Setup view in the next select box.
You'll see all TypoScript nodes here.
Find the node plugin.tx_felogin_pi1.templateFile to figure out the path to the template file which is used for the login.
Now simply edit that file and replate the error message markups with bootstrap alerts.
(Always good to know which TYPO3 version you are on to provide better answers.)
edit:
the fe_login markers can be wrapped in TypoScript:
plugin.tx_felogin_pi1 {
successMessage_stdWrap.wrap = <div class="alert alert-success">|</div>
errorMessage_stdWrap.wrap = <div class="alert alert-danger">|</div>
}

OctoberCMS plugin SEO Meta Og image

I've been stuck on this problem for a few days, so I thought its best to ask the community.
So my problem is this, I'm trying to share a post. The post is generated dynamically. I'm using the addthis.com sharing toolbox. I also installed the SEO plugin by netsti and added the component on header
Now when I want to share, the image doesn't load on first share. I need to scrape the information through Facebook debugger.
I want to know if there is anyway to make a
So I'd like to know if there's anyway to set up the meta og image on head with functions like onStart or onEnd
Thanks
Yes why not you can add your own tags in layouts.
In your layout files or partial files where your <head> tag is, you can define something like this
{% if fbImage %}
<meta property="og:image" content="{{ fbImage }}" />
{% endif %}
Now in your page code section, you can define onStart method and add your fbImage
function onStart(){
// or you can get file object from your post or record
// and get its absolute path and use it `getPath()`
$imagePath = 'https://yoursite/image.jpeg';
$this['fbImage'] = $imagePath; // image absolute path
}
In this way you are telling page what image to display in "og:image" tag and for security we are checking its value if its not defined or blank we used if condition so "og:image" tag will not added.
If any issue please comment.

Specifying Meta Fields per template

Is it possible to specify metafields in theme? I'm thinking either in a header part of the liquid template file or in the settings_data.json file or somewhere?
That would enable us to have different meta fields for different page tempaltes and to specify that information in code where it is under source control.
To be clear, I'm not asking how to access the metafield data once it's set. Thats well documented and straight forward. I'm asking how to define in the theme what metafield keys should have form fields in the corresponding edit screens in /admin.
So, if for example I have a template /page.coffee.liquid there might be a header section:
````
/page.coffee.liquid
----------------------------------
Fields:
extras
Origin: String
Strength: integer
Options: radio
Milk
Sugar
----------------------------------
<h1>Hi, checkout your coffee</h1>
<ul>
<li>Origin: {{ extras.Origin }}</li>
<li>Strength: {{ extras.Strength }}</li>
<li>Milk n Sugar: {{ extras.Options }}</li>
</ul>
````
Shpify would then now that if a product uses this template (selected in the admin interface) then these metafield options would show in the edit screen in admin.
This is an example of how it could work to enable me to do what i want, which is:
Define metafield controls displayed in the admin area per template within a config or template file.
Shopify doesn't work that way. You'd do this with an app where you would link the template and sets of metafields.
The app would use the embedded app sdk so that it can be embedded in the Shopify admin
The app would provide an admin link on the product page. Your app would check the product template and look up the metafields needed and then present those with appropriate drop-downs/validation etc.
Biggest and most incredible thing I have found to help with metafields is this Chrome Extension by FreakDesign called ShopifyFD.
It's a Chrome extension that -- once clicked and activated -- extends your Shopify admin pages to give you complete access to current metafields as well as any new ones that you want to add.
I just found it the other day and I got so giddy with the new doors that opened up.
This will allow you to control your metafields per page and then handle your logic elsewhere.
Source: https://freakdesign.com.au/pages/shopifyfd

How to show data from a db on a page in a web app?

I've setup a database, populated it with data manually for the sake of simplicity, created and set up a jinja template, so my Clojure in Lumminus is working. But how can I actually select data from my db and pass into the template? I have no idea and here http://www.luminusweb.net/docs/guestbook.md#accessing_the_database it's not explained clearly, it just says what I'm able to and not to do.
So how can I actually retrieve data from the db and display it on an html page? Could anyone help me?
On my html page I have this:
{% for article in articles %}
Title is: {{article.title}}
{% endfor %}

Squarespace per page custom navigation links

So I've spent a day on Google, and trying bits of jquery/javascript to do what I'm looking to do and am officially stuck.
I'm building a site using Squarespace, with the Marquee theme applied. I would like to be able to add a custom link in the primary navigation to send users to an alternative language version of each specific page.
But, I'm struggling. Ive found solutions on here that should work, but I don't think I'm applying it right. Ive tried adding a single link to the navigation and using a script on each page (in the code injection point of the head section) point that link somewhere else.
This would mean I have a single link in the navigation (which is standard across the site) pointing users to whichever page I want...on a per page basis. I know there is a solution out there....just can't make it work!
The section I need the link to work from is:
<div id="desktopNav" data-content-field="navigation-mainNav" data-annotation-alignment="bottom left">
<nav class="main-nav" id="yui_3_17_2_1_1450478013910_660">
<div class="nav-wrapper" id="yui_3_17_2_1_1450478013910_659">
<ul class="cf" id="yui_3_17_2_1_1450478013910_658">
<li class="page-collection">
<span>Menu</span>
</li>
</ul>
</div>
</nav>
</div>
None of this can be edited directly though...
I was thinking something like this could work, but I cant work out how to apply it to my situation...
Change href value for a hyperlink
Any help, gratefully received!
I fixed it...using this:
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$('a[href*="original.site"]').attr('href', 'http://website.com');
});
</script>
It allows me to point a single link in the navigation (which cant be edited directly) to whatever I want it to go to.