Displaying Page Attributes

Permalink
Hi Team ,
I have set-up a new page defult and layout for a client so he can add pages for differnt Locations for SEO . Now I have created the template with all the text blocks and Page header already Loaded.

Now I would Like to inject the [Page Name] Attruibute in a standard content block? I can't see if this is already a feature? see example below.

" Sage Roofing are Specialist in flat roofing [Page Name] "

I can see the block Add Attribute which gives me only the brakets above.

If this is not a feature, may I request it to be added as, I can see this feature being very usefull to add Defualt page attruibutes into blocks on page templates.

Thanks
Carl Lee

carl101lee
 
MrKDilkington replied on at Permalink Reply
MrKDilkington
Hi carl101lee,

Page Name is a custom style. To use it, you must first select text and then apply it.

The reason why it is displaying as "[Page Name]" is that you are not applying it to text.
Shotster replied on at Permalink Reply
Shotster
> Page Name is a custom style. To use it, you
> must first select text and then apply it.

I know it's a bit off topic, but I discovered that functionality only recently, and I have to say, it makes absolutely no sense to me whatsoever. Quite the contrary, I find it thoroughly confusing and a prime example of extremely poor UI design. It seems to have been convenient from a programming standpoint to hijack an existing menu and repurpose it.

I can't imagine anyone ever thinking to check a "style" menu in order to add "content". Not only that, but selecting content which has already been added only to have it replaced is simply bizarre.

:-/

-Steve
MrKDilkington replied on at Permalink Reply
MrKDilkington
@Shotster

I agree that including this function in custom styles makes it confusing to use.
andrew replied on at Permalink Reply
andrew
You do NOT click to select first. You just click the insert the cursor wherever you want the placeholder to go. Then you click the item you want to insert.

As far as it not making sense, yeah, it probably ought to be be grouped inside a completely different menu than the one that populates styles from the theme, and have a better tooltip. Reasons for including it on the same menu include toolbar space concerns, and the fact that every single item from that menu is loaded via AJAX, including the snippets (page name, etc...) as well as the styles – because they come from the theme dynamically.

Additionally, The tooltip was only recently added to Redactor. Before, it was just a menu with a magic wand.
Shotster replied on at Permalink Reply
Shotster
> You do NOT click to select first.

Ah, well that makes more sense - to simply place the insertion point where you want the content. It's still very much out of place under that menu, but I was unaware of the history. Perhaps a "snippets" or "data" or simply "insert" menu of some kind would be better? Maybe do away with the toolbar icon altogether and just display a contextual menu on right click within the text. It's not as "discoverable" that way, but once you do it, you don't forget.

-Steve
MrKDilkington replied on at Permalink Reply
MrKDilkington
@andrew

I recommended selecting the text first because it was the only way I was able to get it to work consistently. Also, it behaves like a custom style, wrapping the selected text in span tags with class="ccm-content-editor-snippet" and data-scshandle="page_name".

I understand your position that this is not the proper way to use it.

The problem is without selecting text first the behavior is very inconsistent. Sometimes the page name attribute works and sometimes it doesn't, I haven't figured out the pattern yet.

Another issue is if the page name attribute is used at the end of the last sentence, you cannot create a new line without the attribute tags repeating. Backspacing does not remove it, only deleting the text will.

Here is a screen recording of what I am describing:
http://www.screencast.com/t/sacVpE0cPyP...
carl101lee replied on at Permalink Reply
carl101lee
Hi OK

So I see the page name and user name Attriubute, now it is very hidden,

But it seems to do nothink but add some styling? What I want is it to display the actual pages Name in side the text?

How Can I be using it wrong?
http://sageroofing.usp3.net/index.php/about/roofing-services/chelms...

Thanks for any advise?
carl101lee replied on at Permalink Reply
carl101lee
Think this is off topic.

I want to DIsplay the Page Attribute [Page Name/Title] With in a content Block on the Page templates so that any page created using the template auto Fills in the Content blocks with the Page name attribute?

Does any one follow?

Carl
MrKDilkington replied on at Permalink Reply
MrKDilkington
@carl101lee

"Page Name is a custom style. To use it, you must first select text and then apply it.

The reason why it is displaying as "[Page Name]" is that you are not applying it to text."

Did you select text and then apply the Page Name custom style? The text selected will be replaced with the page name. Just clicking on the Page Name custom style adds "[Page Name]", not the name of the page.
andrew replied on at Permalink Reply
andrew
This is not correct. In the context of a content block, the page name placeholder is a place holder. You should click the cursor where you want the page name to be inserted, and select it from the menu, and it will be inserted. It's not necessary to select text to use it, and I imagine it actually might make it work less well.
carl101lee replied on at Permalink Reply
carl101lee
OK People...

SO I have tried this Both ways.. Selecting text and just inserting the formatting for both page name and user.

Never of witch seem to do any think? I have tried it on Different page types and in their own blocks and different pages not of which seem to work...

I must have broken the theme? or concrete as I guess this should be working.

Thanks
Carl
carl101lee replied on at Permalink Reply
carl101lee
OK....

So still can't work out a pattern to getting it to work...

When I apply the code I see below in the page code.

<span style="font-size: 15px; font-weight: 400; line-height: 1.42857143; color: rgb(51, 51, 51); background-color: rgb(253, 255, 206);">Page Name</span>

I don't seem to have any class being set? Or Data?
Going to try in-putting them manually into the HTML.



Thanks
Carl
carl101lee replied on at Permalink Reply
carl101lee
Ok Peeps...

Could not get the editor to Create the code.... So I just edited the HTML and Pasted this in where I wanted it.

<span rel="font-size: 15px; font-weight: 400; line-height: 1.42857143; color: rgb(51, 51, 51); background-color: rgb(253, 255, 206);"></span><span class="ccm-content-editor-snippet" data-scshandle="page_name">Page Name</span>

This does the trick .. and you can paste it inside headers no problem in the code.. But if you edit the content Block and touch them it all goes a bit wrong...

With Thanks
Carl
carl101lee replied on at Permalink Reply
carl101lee
Hi People

I have come back roudn to needing this again on the lastes verion of concrete.

their are still some errors using this

<span class="ccm-content-editor-snippet" data-scshandle="page_name


Can anyone show/tell me a list of attrubutes u can use on this other than page_name?

Idealy I want to be able to add Parent Page Name?
but a list of what is avaiable would be nice.

Thanks
Carl
MrKDilkington replied on at Permalink Reply
MrKDilkington
@carl101lee

There are only two options available, Page Name and User Name.

User hissy created an add-on for adding additional snippets.
https://www.concrete5.org/marketplace/addons/basic-snippets-pack...