Output Page URL in Expression Engine - expressionengine

Using expression engine, trying to simply output the page's url to the page in text... will need to handle this conditionally; however, how does one simply get the {page_url} to appear on the page as text through the ee an site.group footer.html file?

I believe the EE variable to display the full URL is {current_url}
http://ellislab.com/expressionengine/user-guide/templates/globals/single_variables.html#current-url

Related

Apex - Display Text on Page

I need to add some Pages to our Oracle Apex Application, which have to work as sort of an Instruction for new people in the Team. When I add a Static Content, to the page, I can add some text to it. But when I start a new line in the Source Box, this new line does not show up in Apex.
Do I need to use something different for text, or?
Kind Regards
Elias
The help section in the page builder shows that this region expects html. It's perfectly possible to put in plain text without any html but as you state, newlines aren't guaranteed.
Basic example of text with a line break as region source for static content region:
<p>
Hello<br>
World
</p>
Depending on the requirement, it's possible to use any html element, css (inline or defined in page header), javascript etc

Un-setting route parameters in razorpages pages

I have a page Index that has two optional parameters: FolderId and OrganisationId.
If I use #page "{OrganisationId:int?}/{FolderId:int?}" at the start of the razorpages page to make nicer URLs then it becomes impossible to remove a parameter from the URL. The behaviour of the URL helpers changes.
For example the browser is at /Index/1/4 and I want to make a link to /Index/1. The code for the link ought to be
<a asp-area="Files" asp-page="/Index" asp-route-OrganisationId="#Model.Organisation.Id">#Model.Organisation.Name</a>
This works for #page, producing the required /Index/.
However, if the razorpages page begins with #page "{OrganisationId:int?}/{FolderId:int?}" then instead this renders /Index/1/4 which is clearly wrong because it is not what was asked for.
I have tried asp-route-FolderId="" and using asp-route-all-data but the unwanted parameter still appears.
Is it possible to get URL helpers to work correctly with the route templates?

Orchard CMS 100% unthemed html page

We have a requirement to use the content zone of Orchard CMS to enter in html for a full screen landing page. We managed to get an unthemed page type using the Downplay.Orchard.Layout selector. The problem is that in using the content zone orchard automatically wraps html, head and body tags around it. We want to remove this content so we essentially have a blank page to start off with and then we can create our own html to display on the landing page. Is this possible to do for a single page and if so what would be the best way to do this?
You can have a URL alternate or you can use the new Disable Template part (1.8, i think)
I have done lots of URL alternates in the past. Pretty easy.
Just remembered, a question like this: Using Alternatives for Document.cshtml in Orchard CMS
removing the Wrapper (Document.cshtml) from your (Layout-url-...) and adding a new one, should do the trick.
And it might be better to use the placement.info, but thats my opinion...
Suppressing Wrappers and Placement.info

Orchard - access a content type through different URLs so they use different views

I'm trying to create a CSS documentation library in Orchard. I want to save a description, CSS snippet and HTML snippet against each content type. The first view would show the description and CSS and HTML code written out. The second view would show a preview of what the CSS and HTML look like rendered.
cssdocumentation.com/content/item1
cssdocumentation.com/content/item1/live-preview
I've created the content type and the first view. But I'm not sure how to create the second view. I can see if I can create the alternative URL I can use the Url Alternates module to create an overriding .cshtml
To create an alternative URL I've looked at the autoroute module but this only allows you to adapt a single URL (unless I'm missing something?) and I've looked at Alias UI but this forces me to manually create an alternative URL everytime I create a content item.
Is this possible in Orchard without writting too much C#? (I'm a frontend developer so I only dabble in the behind the scenes stuff)
Thanks for any help
Best solution is to do this within your own module. But as a secondary option instead of having a second page, combine this content with your first page and hide it with CSS. When the user clicks a button to navigate to the next step render the CSS/HTML result on the same page. You can do this in many ways, here are a few ideas:
Render the CSS/HTML result out straight away on the same page but hide it. Show it when the user clicks a button
using jQuery to render the result on the client side. More dynamic if you allow editing of the HTML and CSS.
Redirecting the user to the same page with specific url parameters which you can pick up in your alternate to modify the output.

display only the content of a page in lightbox2 in drupal

I am using drupal.I have to display the content of a page in lightbox2.(only the content not header,footer,menubar,sidebar etc).The url of that content node is http://mysite.com/node/1.
I have included the lightbox2 module and used the below code
<li>click here to see node content</li>
But the lightbox displays the whole page not only the content.i need only the text content.
One more option in that you can pass a parameter in get method for lightbox2 content.
Based on the parameter add condition in page.tpl.php
Not the best of the solution, but achievable.
Create a new page.tpl for node/1 and print only $content in this.
this way you will make sure you only get content and nothing else
I Agree with Vaibhav Jain, you can create a theme for the page without the header, left and right, footer. only the content and call that page inside the lightbox

Resources